-
Notifications
You must be signed in to change notification settings - Fork 71
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: Resolve errors for vm resource not found #633
fix: Resolve errors for vm resource not found #633
Conversation
@microsoft-github-policy-service agree |
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 @tallaxes take a look for second approval?
https://github.com/Azure/azure-sdk-for-go-extensions/blob/main/pkg/errors/armerrors.go#L34 can we also add this change here too? |
Pull Request Test Coverage Report for Build 12678035442Details
💛 - Coveralls |
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 - and thank you @tangyouzzz for the fix! Some possible improvements:
- Checking for
azErr.StatusCode == http.StatusNotFound
instead should catch both - Same logic should be applied deleting other resources (like NIC); other resource providers are very likely to exhibit the same pattern
- A helper method would be better to avoid code duplication (and yes, would be good to update azure-sdk-for-go-extensions)
Merging since this fixes an actual problem, but let's follow-up on feedback |
Co-authored-by: yl5722 <[email protected]> Co-authored-by: Alex Leites <[email protected]>
Co-authored-by: yl5722 <[email protected]> Co-authored-by: Alex Leites <[email protected]>
Co-authored-by: tangyouzzz <[email protected]> Co-authored-by: yl5722 <[email protected]>
Fixes #525
Description
https://learn.microsoft.com/en-us/azure/azure-resource-manager/troubleshooting/error-not-found?tabs=bicep#symptoms
When using the GET method to obtain a VM, the Error Code returned when the VM does not exist can be either NotFound or ResourceNotFound.
In IsNotFoundErr, only the situation of ResourceNotFound will be judged, which will cause the node to remain in the notready state and cannot be deleted.
How was this change tested?
az vm simulate-eviction
to simulate spot node releaseDoes this change impact docs?
Release Note