-
Notifications
You must be signed in to change notification settings - Fork 39k
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
Ensure cloudprovider.InstanceNotFound is reported when the VM is not found on Azure #61531
Conversation
/sig azure |
@@ -51,6 +52,9 @@ func (az *Cloud) GetVirtualMachineWithRetry(name types.NodeName) (compute.Virtua | |||
var retryErr error | |||
err := wait.ExponentialBackoff(az.requestBackoff(), func() (bool, error) { | |||
machine, retryErr = az.getVirtualMachine(name) | |||
if retryErr == cloudprovider.InstanceNotFound { | |||
return false, cloudprovider.InstanceNotFound |
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.
should be true to prevent retrying?
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.
Fixed.
/retest |
ping @karataliu @andyzhangx |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: feiskyer, karataliu 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 |
Automatic merge from submit-queue (batch tested with PRs 61434, 61501, 59609, 61467, 61531). If you want to cherry-pick this change to another branch, please follow the instructions here. |
…31-upstream-release-1.9 Automatic merge from submit-queue. Automated cherry pick of #61531: Ensure cloudprovider.InstanceNotFound is reported when the VM is not found on Azure Cherry pick of #61531 on release-1.9. #61531: Ensure cloudprovider.InstanceNotFound is reported when the VM is not found on Azure
…31-upstream-release-1.10 Automatic merge from submit-queue. Automated cherry pick of #61531: Ensure cloudprovider.InstanceNotFound is reported when the VM is not found on Azure Cherry pick of #61531 on release-1.10. #61531: Ensure cloudprovider.InstanceNotFound is reported when the VM is not found on Azure
What this PR does / why we need it:
Azure ExponentialBackoff will still try to get VM information even when the VM has already been removed on Azure:
kubernetes/pkg/cloudprovider/providers/azure/azure_backoff.go
Lines 52 to 60 in 1365ce3
It should report
cloudprovider.InstanceNotFound
early and avoid calling Azure APIs on such case.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 #61465
Special notes for your reviewer:
Should be cherry-picked to v1.9
Release note: