Merge pull request #4341 from justinsb/aws_lc_err_handling_fix

AWS LaunchConfiguration error handling fix
This commit is contained in:
k8s-ci-robot 2018-01-25 09:25:17 -08:00 committed by GitHub
commit f1a439f163
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -317,8 +317,9 @@ func (_ *LaunchConfiguration) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *La
maxAttempts := 10
for {
attempt++
_, err = t.Cloud.Autoscaling().CreateLaunchConfiguration(request)
glog.V(8).Infof("AWS CreateLaunchConfiguration %s", aws.StringValue(request.LaunchConfigurationName))
_, err = t.Cloud.Autoscaling().CreateLaunchConfiguration(request)
if err == nil {
break
}
@ -335,8 +336,9 @@ func (_ *LaunchConfiguration) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *La
continue
}
glog.V(4).Infof("ErrorCode=%q, Message=%q", awsup.AWSErrorCode(err), awsup.AWSErrorMessage(err))
return fmt.Errorf("error creating AutoscalingLaunchConfiguration: %v", err)
}
return fmt.Errorf("error creating AutoscalingLaunchConfiguration: %v", err)
}
e.ID = fi.String(launchConfigurationName)