add debugging help if ec2-upload-bundle fails

This commit is contained in:
Matthew Hooker 2017-10-05 17:31:39 -07:00
parent 2a326b5172
commit ae455bff99
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
1 changed files with 6 additions and 0 deletions

View File

@ -82,6 +82,12 @@ func (s *StepUploadBundle) Run(state multistep.StateBag) multistep.StepAction {
}
if cmd.ExitStatus != 0 {
if cmd.ExitStatus == 3 {
ui.Error(fmt.Sprintf("Please check that the bucket `%s` "+
"does not exist, or exists and is writable. This error "+
"indicates that the bucket may be owned by somebody else.",
config.S3Bucket))
}
state.Put("error", fmt.Errorf(
"Bundle upload failed. Please see the output above for more\n"+
"details on what went wrong."))