Skip to content
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 attach azure disk in vmss #71992

Merged
merged 1 commit into from
Dec 17, 2018

Conversation

andyzhangx
Copy link
Member

What type of PR is this?

Uncomment only one, leave it on its own line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:
When attach/detach azure disk in vmss, it updates whole VM info, including: networkProfile, storageProfile, while this would lead to race condition when there is also network related setting changing in k8s cloud provider in the mean time.
This PR fixed this issue by using a new vm data and only updates storageProfile related info.

Related RESET api doc could be found here:
https://docs.microsoft.com/en-us/rest/api/compute/virtualmachinescalesetvms/update

Which issue(s) this PR fixes:

Fixes #71991

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

none

Release note:

fix race condition when attach azure disk in vmss

/kind bug
/assign @feiskyer
/priority important-soon
/sig azure

cc @brendandburns @khenidak

By my testing, it works well in disk attach/detach, while let me hold for a while, check with vmss team first. Thanks.
/hold

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. sig/azure cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 12, 2018
@k8s-ci-robot k8s-ci-robot added the sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. label Dec 12, 2018
@justaugustus
Copy link
Member

/retest

@andyzhangx
Copy link
Member Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 17, 2018
@andyzhangx
Copy link
Member Author

@feiskyer

Copy link
Member

@feiskyer feiskyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 17, 2018
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 2b96a60 into kubernetes:master Dec 17, 2018
k8s-ci-robot added a commit that referenced this pull request Dec 27, 2018
…1992-upstream-release-1.12

Automated cherry pick of #71992: fix race condition when attach azure disk in vmss
k8s-ci-robot added a commit that referenced this pull request Jan 4, 2019
…1992-upstream-release-1.11

Automated cherry pick of #71992: fix race condition when attach azure disk in vmss
k8s-ci-robot added a commit that referenced this pull request Jan 5, 2019
…1992-upstream-release-1.13

Automated cherry pick of #71992: fix race condition when attach azure disk in vmss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

race condition when attach/detach azure disk in vmss
4 participants