mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #57994 from karataliu/azure_vm_cache_bug
Automatic merge from submit-queue (batch tested with PRs 57552, 57994). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Fix vm cache in concurrent case in azure_util.go **What this PR does / why we need it**: Fix a bug in azure vm cache. In case two callers call 'getVirtualMachine', if the second caller sees non-empty request.VM, it should return that value, instead of the default 'vm' variable. **Which issue(s) this PR fixes** Follow up of #57031 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
This commit is contained in:
commit
4264efd36e
@ -112,7 +112,7 @@ func (az *Cloud) getVirtualMachine(nodeName types.NodeName) (vm compute.VirtualM
|
||||
|
||||
request.vm = &vm
|
||||
}
|
||||
return vm, nil
|
||||
return *request.vm, nil
|
||||
}
|
||||
|
||||
glog.V(6).Infof("getVirtualMachine hits cache for(%s)", vmName)
|
||||
|
Loading…
Reference in New Issue
Block a user