Skip to content

Commit

Permalink
Merge pull request kubernetes#5444 from vmarmol/lock
Browse files Browse the repository at this point in the history
Lock access and update to Kubelet pods.
  • Loading branch information
vishh committed Mar 13, 2015
2 parents 97e1295 + 0e48531 commit 13253d0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/kubelet/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -1695,6 +1695,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")
Expand Down

0 comments on commit 13253d0

Please sign in to comment.