cloud/awscloud: retry CreateFleet regardless of the error code
The errors returned by create fleet are not entirely clear. It seems it also returns `InsufficientInstanceCapacity` in addition to `UnfulfillableCapacity`. Let's just retry three times regardless of the create fleet error, that way there's no need to chase error codes which aren't clearly defined.
This commit is contained in:
parent
73968236bd
commit
5eb8227bf3
2 changed files with 6 additions and 6 deletions
|
|
@ -142,7 +142,7 @@ func TestSICreateFleetFailures(t *testing.T) {
|
|||
aws := awscloud.NewForTest(m, &ec2imdsmock{t, "instance-id", "region1"}, nil, nil, nil)
|
||||
require.NotNil(t, aws)
|
||||
|
||||
// unfillable capacity should call create fleet thrice
|
||||
// create fleet error should call create fleet thrice
|
||||
m.failFn["CreateFleet"] = nil
|
||||
si, err := aws.RunSecureInstance("iam-profile", "key-name", "cw-group", "hostname")
|
||||
require.Error(t, err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue