Commit dab6d04
authored
Add retries to tests when waiting on assuming new role via EKS Pod Identity (#713)
*Issue #, if available:*
*Description of changes:*
Tests have been failing occasionally with the following error:
```
I0225 13:22:11.375776 22828 credentials.go:1212] Waiting until IAM role for ServiceAccount s3-csi-driver-sa is assumable for EKS Pod Identity (s3-csi-node-9xnvd, 86ff74d5-992b-4ae5-a4e2-6c3de483636a, kube-system)
I0225 13:22:11.524430 22828 credentials.go:1156] Unexpected error:
<*smithy.OperationError | 0xc000ef2690>:
operation error EKS Auth: AssumeRoleForPodIdentity, https response error StatusCode: 404, RequestID: 4a91f663-7fbf-46d1-9188-5c63cccaa7ad, ResourceNotFoundException: The token included in the request has no service account role association for it.
```
This error implies that the EKS Auth service has not yet registered the
new assocation.
This change adds `ResourceNotFoundException` to the list of error codes
that will trigger the SDK to retry in the function when waiting for the
role to be "assumable".
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com>1 parent 08ee3c6 commit dab6d04
1 file changed
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
| |||
1139 | 1142 | | |
1140 | 1143 | | |
1141 | 1144 | | |
1142 | | - | |
| 1145 | + | |
| 1146 | + | |
1143 | 1147 | | |
1144 | | - | |
| 1148 | + | |
1145 | 1149 | | |
1146 | 1150 | | |
1147 | 1151 | | |
| |||
1176 | 1180 | | |
1177 | 1181 | | |
1178 | 1182 | | |
1179 | | - | |
| 1183 | + | |
1180 | 1184 | | |
1181 | 1185 | | |
1182 | 1186 | | |
| |||
1204 | 1208 | | |
1205 | 1209 | | |
1206 | 1210 | | |
1207 | | - | |
| 1211 | + | |
1208 | 1212 | | |
1209 | 1213 | | |
1210 | 1214 | | |
| |||
0 commit comments