-
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
🐛 fix: s3: fix bucket object not found #4879
🐛 fix: s3: fix bucket object not found #4879
Conversation
If any error of non awserr.Error type happens when trying to list a bootstrap data object, it would be silently ignored.
The `s3.HeadObject` API call can return "NotFound" when either the bucket or the object does not exist (as opposed to the more descriptive `s3.ErrCodeNoSuchKey` or `s3.ErrCodeNoSuchBucket`). This would cause the machine controller to loop indefinitely trying to delete an already deleted object but failing: ``` E0316 16:37:08.973942 366 awsmachine_controller.go:307] "unable to delete machine" err=< deleting bootstrap data object: deleting S3 object: NotFound: Not Found status code: 404, request id: 5Z101DW1KN380WTY, host id: tYlSi9K38lBkIsr2DNf/xFfgDuFaVfeUmpscXdljiMZC5iRxPIDuXSLwHJwdFnosYCfi7Bih25GaDpVAbSq4ZA== > ```
Hi @r4f4. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/ok-to-test /assign @damdo |
caa1275
to
9fe856c
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: 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 |
Does this require a backport to v2.3.x and others? |
@AndiDog it depends on when the issue was introduced, would you be able to check? |
/cherry-pick release-2.4 |
@richardcase: new pull request created: #4907 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. |
No backport required for v2.3.x since the |
* 🐛 fix: s3: do not ignore non-aws errors when deleting object If any error of non awserr.Error type happens when trying to list a bootstrap data object, it would be silently ignored. * 🐛fix: s3: ignore "NotFound" errors The `s3.HeadObject` API call can return "NotFound" when either the bucket or the object does not exist (as opposed to the more descriptive `s3.ErrCodeNoSuchKey` or `s3.ErrCodeNoSuchBucket`). This would cause the machine controller to loop indefinitely trying to delete an already deleted object but failing: ``` E0316 16:37:08.973942 366 awsmachine_controller.go:307] "unable to delete machine" err=< deleting bootstrap data object: deleting S3 object: NotFound: Not Found status code: 404, request id: 5Z101DW1KN380WTY, host id: tYlSi9K38lBkIsr2DNf/xFfgDuFaVfeUmpscXdljiMZC5iRxPIDuXSLwHJwdFnosYCfi7Bih25GaDpVAbSq4ZA== > ``` * 🌱s3: add unit test for already deleted s3 object.
* 🐛 fix: s3: do not ignore non-aws errors when deleting object If any error of non awserr.Error type happens when trying to list a bootstrap data object, it would be silently ignored. * 🐛fix: s3: ignore "NotFound" errors The `s3.HeadObject` API call can return "NotFound" when either the bucket or the object does not exist (as opposed to the more descriptive `s3.ErrCodeNoSuchKey` or `s3.ErrCodeNoSuchBucket`). This would cause the machine controller to loop indefinitely trying to delete an already deleted object but failing: ``` E0316 16:37:08.973942 366 awsmachine_controller.go:307] "unable to delete machine" err=< deleting bootstrap data object: deleting S3 object: NotFound: Not Found status code: 404, request id: 5Z101DW1KN380WTY, host id: tYlSi9K38lBkIsr2DNf/xFfgDuFaVfeUmpscXdljiMZC5iRxPIDuXSLwHJwdFnosYCfi7Bih25GaDpVAbSq4ZA== > ``` * 🌱s3: add unit test for already deleted s3 object.
What type of PR is this?
/kind bug
What this PR does / why we need it:
The
s3.HeadObject
API call can return "NotFound" when either the bucket or the object does not exist (as opposed to the more descriptives3.ErrCodeNoSuchKey
ors3.ErrCodeNoSuchBucket
).This would cause the machine controller to loop indefinitely trying to delete an already deleted object but failing:
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 #4859
Special notes for your reviewer:
Checklist:
Release note: