-
Notifications
You must be signed in to change notification settings - Fork 578
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
🐛 On deletion, should ignore if the secret cannot be found #4557
🐛 On deletion, should ignore if the secret cannot be found #4557
Conversation
Signed-off-by: Vince Prignano <[email protected]>
/assign @JoelSpeed @richardcase @Skarlso |
I swear I've seen this one before. 🤣🤣 |
@@ -777,7 +777,7 @@ func (r *AWSMachineReconciler) ignitionUserData(scope *scope.MachineScope, objec | |||
|
|||
func (r *AWSMachineReconciler) deleteBootstrapData(machineScope *scope.MachineScope, clusterScope cloud.ClusterScoper, objectStoreScope scope.S3Scope) error { | |||
_, userDataFormat, err := machineScope.GetRawBootstrapDataWithFormat() | |||
if err != nil { | |||
if client.IgnoreNotFound(err) != nil { |
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.
To be consistent across, can we use apierrors.IsNotFound(err)
here?
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.
We added this in controller runtime to be easier for folks to deal with, I don't have a strong opinion on either; but this requires one less import in general, and it's a bit easier to read
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.
Makes sense 👍
/test pull-cluster-api-provider-aws-e2e-blocking |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Ankitasw 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 |
What type of PR is this?
/kind bug
What this PR does / why we need it:
If a Machine fails to bootstrap due to a problem with the bootstrap secret (which is generated separately), when the AWSMachine tries to delete the machine, it can get stuck trying to find that secret. Ignore not found errors.
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 #
Special notes for your reviewer:
Checklist:
Release note: