Lock access and update to Kubelet pods.

pull/6/head
Victor Marmol 2015-03-13 10:31:26 -07:00
parent 203f37a58a
commit 0e485310cf
1 changed files with 2 additions and 0 deletions

View File

@ -1618,6 +1618,8 @@ func (kl *Kubelet) syncLoop(updates <-chan PodUpdate, handler SyncHandler) {
// Updated the Kubelet's internal pods with those provided by the update.
// Records new and updated pods in newPods and updatedPods.
func (kl *Kubelet) updatePods(u PodUpdate, podSyncTypes map[types.UID]metrics.SyncPodType) {
kl.podLock.Lock()
defer kl.podLock.Unlock()
switch u.Op {
case SET:
glog.V(3).Infof("SET: Containers changed")