Fix the container bridge so that it can create cbr0

Fix the kubelet so that it tries to sync status, even if Docker is down
This commit is contained in:
Brendan Burns
2015-06-19 22:49:18 -07:00
committed by Dawn Chen
parent a29ade2f33
commit 192ffdfb25
6 changed files with 98 additions and 41 deletions

View File

@@ -17,9 +17,11 @@ limitations under the License.
package kubelet
import (
"errors"
"fmt"
"reflect"
"sync"
"time"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
@@ -58,6 +60,8 @@ func (s *statusManager) Start() {
err := s.syncBatch()
if err != nil {
glog.Warningf("Failed to updated pod status: %v", err)
// Errors and tight-looping are bad, m-kay
time.Sleep(30 * time.Second)
}
}, 0)
}
@@ -124,6 +128,9 @@ func (s *statusManager) RemoveOrphanedStatuses(podFullNames map[string]bool) {
// syncBatch syncs pods statuses with the apiserver.
func (s *statusManager) syncBatch() error {
if s.kubeClient == nil {
return errors.New("Kubernetes client is nil, skipping pod status updates")
}
syncRequest := <-s.podStatusChannel
pod := syncRequest.pod
podFullName := kubecontainer.GetPodFullName(pod)