Commit 13253d09 authored by Vish Kannan's avatar Vish Kannan

Merge pull request #5444 from vmarmol/lock

Lock access and update to Kubelet pods.
parents 97e12957 0e485310
...@@ -1695,6 +1695,8 @@ func (kl *Kubelet) syncLoop(updates <-chan PodUpdate, handler SyncHandler) { ...@@ -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. // Updated the Kubelet's internal pods with those provided by the update.
// Records new and updated pods in newPods and updatedPods. // Records new and updated pods in newPods and updatedPods.
func (kl *Kubelet) updatePods(u PodUpdate, podSyncTypes map[types.UID]metrics.SyncPodType) { func (kl *Kubelet) updatePods(u PodUpdate, podSyncTypes map[types.UID]metrics.SyncPodType) {
kl.podLock.Lock()
defer kl.podLock.Unlock()
switch u.Op { switch u.Op {
case SET: case SET:
glog.V(3).Infof("SET: Containers changed") glog.V(3).Infof("SET: Containers changed")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment