mirror of https://github.com/kubernetes/kops.git
AWS LaunchConfiguration error handling fix
We would loop forever on an unexpected error.
This commit is contained in:
parent
46a6d256d3
commit
9919254205
|
|
@ -317,8 +317,9 @@ func (_ *LaunchConfiguration) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *La
|
||||||
maxAttempts := 10
|
maxAttempts := 10
|
||||||
for {
|
for {
|
||||||
attempt++
|
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 {
|
if err == nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
@ -335,8 +336,9 @@ func (_ *LaunchConfiguration) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *La
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
glog.V(4).Infof("ErrorCode=%q, Message=%q", awsup.AWSErrorCode(err), awsup.AWSErrorMessage(err))
|
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)
|
e.ID = fi.String(launchConfigurationName)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue