Commit 8e04d87
authored
🐛 fix: s3: fix bucket object not found (#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.1 parent dd2d76b commit 8e04d87
2 files changed
+36
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
207 | 210 | | |
208 | 211 | | |
209 | 212 | | |
210 | 213 | | |
211 | 214 | | |
212 | 215 | | |
213 | 216 | | |
214 | | - | |
215 | | - | |
216 | 217 | | |
217 | 218 | | |
| 219 | + | |
218 | 220 | | |
219 | 221 | | |
220 | 222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
694 | 694 | | |
695 | 695 | | |
696 | 696 | | |
697 | | - | |
| 697 | + | |
698 | 698 | | |
699 | 699 | | |
700 | | - | |
701 | | - | |
702 | 700 | | |
703 | 701 | | |
704 | 702 | | |
| |||
708 | 706 | | |
709 | 707 | | |
710 | 708 | | |
711 | | - | |
| 709 | + | |
| 710 | + | |
712 | 711 | | |
713 | | - | |
714 | | - | |
715 | | - | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
716 | 741 | | |
717 | 742 | | |
718 | 743 | | |
| |||
0 commit comments