-
Notifications
You must be signed in to change notification settings - Fork 39.6k
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 race condition when delete azure disk right after that attach azure disk #84917
Conversation
cc @ritazh |
/test pull-kubernetes-e2e-aks-engine-azure |
/hold cancel below is the sample code showing how this works for
|
/test pull-kubernetes-e2e-aks-engine-azure |
staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_common.go
Show resolved
Hide resolved
staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_common.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_common.go
Show resolved
Hide resolved
staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_common.go
Show resolved
Hide resolved
/hold until we understand more about the race condition. |
/unhold Let us have this as a stop gap for now. |
fix comments
a2950cf
to
b6afc86
Compare
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx, feiskyer 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 |
BTW, there is another |
/hold cancel |
/test pull-kubernetes-e2e-aks-engine-azure |
staging/src/k8s.io/legacy-cloud-providers/azure/azure_controller_common.go
Show resolved
Hide resolved
/retest Review the full test history for this PR. Silence the bot with an |
@andyzhangx: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
…4917-upstream-release-1.16 Automated cherry pick of #84917: fix race condition when attach/delete disk
…4917-upstream-release-1.15 Automated cherry pick of #84917: fix race condition when attach/delete disk
…4917-upstream-release-1.14 Automated cherry pick of #84917: fix race condition when attach/delete disk
What type of PR is this?
/kind bug
What this PR does / why we need it:
fix race condition when attach/delete disk in same time
There is condition that attach and delete disk happens in same time, azure CRP don't check such race condition, this PR is to address such issue:
When there is disk attach/detach operation, it will first insert a record(key is diskURI) into
diskAttachDetachMap
and after operation completed, will remove that record. And in disk delete operation, will first check whether there is a record in thediskAttachDetachMap
, if there is, then return error.Which issue(s) this PR fixes:
Fixes #82714
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
/kind bug
/assign @feiskyer @khenidak
/priority important-soon
/sig cloud-provider
/area provider/azure
/hold
hold a while for review and test