forked from kubernetes-sigs/cluster-api-provider-aws
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 fix: s3: fix bucket object not found (kubernetes-sigs#4879)
* 🐛 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.
- Loading branch information
Showing
2 changed files
with
36 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters