-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix vmssflex ensureBackendPoolDeletedFromNode #4074
Conversation
✅ Deploy Preview for kubernetes-sigs-cloud-provide-azure canceled.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lzhecheng The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test pull-cloud-provider-azure-e2e-ccm-vmssflex-capz |
pkg/provider/azure_vmss.go
Outdated
@@ -1906,7 +1907,9 @@ func (ss *ScaleSet) ensureBackendPoolDeleted(service *v1.Service, backendPoolIDs | |||
return rerr.Error() | |||
} | |||
|
|||
ss.lockMap.LockEntry(updatedVMLock) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use atomic.Store() instead of lock?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For what purpose? atomic is never used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use atomic now.
"They are lockless and generally implemented directly at hardware level"
https://go101.org/article/concurrent-atomic-operation.html
2f94557
to
187eb2b
Compare
* Fix loop pointer issue * Use atomic operation on nicUpdated var * Fix log format Signed-off-by: Zhecheng Li <zhechengli@microsoft.com>
/lgtm |
/cherrypick release-1.27 |
@lzhecheng: once the present PR merges, I will cherry-pick it on top of release-1.27 in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@lzhecheng: new pull request created: #4085 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Fix vmssflex ensureBackendPoolDeletedFromNode
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: