Merge pull request #8342 from cove/retry-runinstances2

retry runinstances aws api that wasn't retried
This commit is contained in:
Megan Marsh 2019-11-07 15:39:02 -08:00 committed by GitHub
commit e70e82d892
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -175,7 +175,9 @@ func (s *StepRunSourceInstance) Run(ctx context.Context, state multistep.StateBa
runOpts.InstanceInitiatedShutdownBehavior = &s.InstanceInitiatedShutdownBehavior
}
runResp, err := ec2conn.RunInstances(runOpts)
runReq, runResp := ec2conn.RunInstancesRequest(runOpts)
runReq.RetryCount = 11
err = runReq.Send()
if err != nil {
err := fmt.Errorf("Error launching source instance: %s", err)
state.Put("error", err)