-
Notifications
You must be signed in to change notification settings - Fork 36
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
Machine object deletion will proceed if backing VM not found #59
Machine object deletion will proceed if backing VM not found #59
Conversation
@AxiomSamarth I would like to merge this PR before PR #58 , as both have clashing changes. So rebase will be req. |
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 there is just one quick nit
6736fce
to
496a9bb
Compare
The I verified that the integration tests and unit tests pass locally and so have merged the PR as this PR needed some discussion before merging |
* map aws error codes to mcm error codes * temporary vendor changes * add error code to replace PR #59 * map ResourceExhausted error code for CreateMachine call * remove unused variables from mockclient.go * revert mcm vendor changes * resolved make check errors * address review comments * address review comments part-2
What this PR does / why we need it:
Till now for cases where a machine obj has ProviderID but the instance on provider is not found , deletion had been be retried.
With This PR if the AWS api returns
InvalidInstanceIDNotFound
error (which was earlier taken as an Internal error and not handled) , the instance deletion is assumed to be success.Eventual consistency can't occur in this case as another PR handles that case for CreateMachine and so it can't reach DeleteMachine.
Also in worst case if instance still exists and we assumed its deletion with this new logic, orphan VM collection will deal with it.
Refer live issue 1201
Which issue(s) this PR fixes:
Fixes #56
Special notes for your reviewer:
I have changed the mockClient functions to return
InvalidInstanceIDNotFound
error in case instance is not found (which was not done earlier) . This mimics the actual behavior of AWS API.The existing testcases are changed accordingly
Also wait for 5min is NOT introduced, as that would deviate the code from other providers a lot.
Release note: