mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Fix bad lock handling.
This commit is contained in:
parent
e74ac01a62
commit
3737b4e4e2
@ -149,6 +149,7 @@ func (rm *ReplicationManager) filterActivePods(pods []api.Pod) []api.Pod {
|
||||
|
||||
func (rm *ReplicationManager) syncReplicationController(controllerSpec api.ReplicationController) error {
|
||||
rm.updateLock.Lock()
|
||||
defer rm.updateLock.Unlock()
|
||||
podList, err := rm.kubeClient.ListPods(controllerSpec.DesiredState.ReplicasInSet)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -168,7 +169,6 @@ func (rm *ReplicationManager) syncReplicationController(controllerSpec api.Repli
|
||||
rm.podControl.deletePod(filteredList[i].ID)
|
||||
}
|
||||
}
|
||||
rm.updateLock.Unlock()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user