The current path sometimes launches two instances, which is problematic because the rest of the secure instance code expects exactly one instance. A security group could be attached to both instances, and would block the worker from launching any more SIs, as it tries to delete the old security group first, which is still held by one of the surplus SIs which didn't get terminated. Only retry if: - on "UnfulfillableCapacity" or "InsufficientInstanceCapacity" error codes; - there wasn't an instance launched anyway. If either of these checks fail, do not try to launch another one, and just fail the job.
4 lines
90 B
Go
4 lines
90 B
Go
package awscloud
|
|
|
|
var NewForTest = newForTest
|
|
var DoCreateFleetRetry = doCreateFleetRetry
|