From 0e485310cf16eb72864ada400b1849a35642c33d Mon Sep 17 00:00:00 2001 From: Victor Marmol Date: Fri, 13 Mar 2015 10:31:26 -0700 Subject: [PATCH] Lock access and update to Kubelet pods. --- pkg/kubelet/kubelet.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index e15ba406dbdc4..7e777edc9080a 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -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")