-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
remove time waiting after create storage account (save 25s) #56679
remove time waiting after create storage account (save 25s) #56679
Conversation
@andyzhangx: GitHub didn't allow me to assign the following users: khenidak. Note that only kubernetes members can be assigned. 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. |
/assign @brendandburns |
/unassign @dims |
/unassign @piosz |
@khenidak pls take a review, thanks. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx, brendandburns Associated issue: 56674 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
I'd like to get this into 1.9, the change is small and the impact is large. |
/kind bug |
@brendanburns can you approve this for the milestone, please? |
// so if this account was just created allow it sometime | ||
// before polling | ||
glog.V(2).Infof("azureDisk - storage account %s was just created, allowing time before polling status", storageAccountName) | ||
time.Sleep(25 * time.Second) // as observed 25 is the average time for SA to be provisioned |
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.
It's surprising we didn't get bugs on this previously. There are definitely cases where this can take longer than 25 seconds, but I guess downstream code probably retries too.
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.
point is we already use sync way to wait for storage account creating successfully, it's not necessary to wait any more:
err := <-errChan
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.
I understand, just surprised this sleep lasted this long without being hardened but I guess it was good enough.
[MILESTONENOTIFIER] Milestone Pull Request Current Note: This pull request is marked as Example update:
Pull Request Labels
|
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
I found azure cloud provider will always sleep 25 seconds after creating a new azure storage account:
https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/azure/azure_blobDiskController.go#L531
Actually it's not necessary now, since it's already using sync way to create a storage account:
https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/azure/azure_blobDiskController.go#L531
Above code will wait until the storage account is created in azure.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #56674
Special notes for your reviewer:
Below are logs without this PR:
Below are logs with this PR, it could save 25s now:
Release note:
/sig azure
/assign @khenidak