Add more logging on IAM failure

I hit an odd IAM failure yesterday, and this information would have been
helpful.  It only proved a negative - it turned out to be an AWS problem
that was solved by deleting and recreating the IAM roles - but still
makes diagnosis much easier.
This commit is contained in:
Justin Santa Barbara 2017-06-09 08:43:06 -04:00
parent 286daa739d
commit 48b26d0f93
1 changed files with 1 additions and 0 deletions

View File

@ -316,6 +316,7 @@ func (_ *LaunchConfiguration) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *La
if attempt > maxAttempts {
return fmt.Errorf("IAM instance profile not yet created/propagated (original error: %v)", message)
}
glog.V(4).Infof("got an error indicating that the IAM instance profile %q is not ready: %q", fi.StringValue(e.IAMInstanceProfile.Name), message)
glog.Infof("waiting for IAM instance profile %q to be ready", fi.StringValue(e.IAMInstanceProfile.Name))
time.Sleep(10 * time.Second)
continue