Merge pull request #6595 from guenter/kubelet-update-channel-closed

kubelet syncloop should stop if/when updates chan closes
This commit is contained in:
Yu-Ju Hong 2015-04-17 10:42:05 -07:00
commit 13b29cd64b

View File

@ -1607,7 +1607,11 @@ func (kl *Kubelet) syncLoop(updates <-chan PodUpdate, handler SyncHandler) {
unsyncedPod := false
podSyncTypes := make(map[types.UID]metrics.SyncPodType)
select {
case u := <-updates:
case u, ok := <-updates:
if !ok {
glog.Errorf("Update channel is closed. Exiting the sync loop.")
return
}
kl.podManager.UpdatePods(u, podSyncTypes)
unsyncedPod = true
case <-time.After(kl.resyncInterval):