From 85de1d06373bcf286a308b16700261efeb031151 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Fri, 27 Sep 2019 11:12:53 -0700 Subject: [PATCH 1/2] make friendlier message warning user that their creds may be wrong --- helper/communicator/step_connect_ssh.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/helper/communicator/step_connect_ssh.go b/helper/communicator/step_connect_ssh.go index 3d806672e..07763e335 100644 --- a/helper/communicator/step_connect_ssh.go +++ b/helper/communicator/step_connect_ssh.go @@ -215,6 +215,12 @@ func (s *StepConnectSSH) waitForSSH(state multistep.StateBag, ctx context.Contex if strings.Contains(err.Error(), "authenticate") { log.Printf( "[DEBUG] Detected authentication error. Increasing handshake attempts.") + err = fmt.Errorf("Packer experienced an authentication error "+ + "when trying to connect via SSH. This can happen if your "+ + "username/password are wrong. You may want to double-check"+ + " your credentials as part of your debugging process. "+ + "original error: %s", + err) handshakeAttempts += 1 } From e31a28bb772f09309f8755227f047ac7b34e10cc Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Fri, 27 Sep 2019 13:51:38 -0700 Subject: [PATCH 2/2] fix generated files for update I committed directly to master --- go.sum | 4 ---- .../builder/amazon/common/_AMIConfig-not-required.html.md | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.sum b/go.sum index 11a593796..53868beac 100644 --- a/go.sum +++ b/go.sum @@ -403,12 +403,8 @@ github.com/vmware/govmomi v0.0.0-20170707011325-c2105a174311 h1:s5pyxd5S6wRs2WpE github.com/vmware/govmomi v0.0.0-20170707011325-c2105a174311/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= github.com/xanzy/go-cloudstack v0.0.0-20190526095453-42f262b63ed0 h1:NJrcIkdzq0C3I8ypAZwFE9RHtGbfp+mJvqIcoFATZuk= github.com/xanzy/go-cloudstack v0.0.0-20190526095453-42f262b63ed0/go.mod h1:sBh287mCRwCz6zyXHMmw7sSZGPohVpnx+o+OY4M+i3A= -github.com/yandex-cloud/go-genproto v0.0.0-20190802103534-6089d9ff8d82 h1:HLQoCLW2021qJKLrGQbcdEikBJ3gfYF94JYqZuw6Qxg= -github.com/yandex-cloud/go-genproto v0.0.0-20190802103534-6089d9ff8d82/go.mod h1:HEUYX/p8966tMUHHT+TsS0hF/Ca/NYwqprC5WXSDMfE= github.com/yandex-cloud/go-genproto v0.0.0-20190916101622-7617782d381e h1:hzwq5GUKP0aQzDja1XP4sBYyOmnezs/RVtzP+xiLbfI= github.com/yandex-cloud/go-genproto v0.0.0-20190916101622-7617782d381e/go.mod h1:HEUYX/p8966tMUHHT+TsS0hF/Ca/NYwqprC5WXSDMfE= -github.com/yandex-cloud/go-sdk v0.0.0-20190802103531-4ab1dac90bf7 h1:rWXARBMLHylvASK6spamDC8zSL5v2voZop3M6SBul9Y= -github.com/yandex-cloud/go-sdk v0.0.0-20190802103531-4ab1dac90bf7/go.mod h1:Eml0jFLU4VVHgIN8zPHMuNwZXVzUMILyO6lQZSfz854= github.com/yandex-cloud/go-sdk v0.0.0-20190916101744-c781afa45829 h1:2FGwbx03GpP1Ulzg/L46tSoKh9t4yg8BhMKQl/Ff1x8= github.com/yandex-cloud/go-sdk v0.0.0-20190916101744-c781afa45829/go.mod h1:Eml0jFLU4VVHgIN8zPHMuNwZXVzUMILyO6lQZSfz854= go.opencensus.io v0.21.0 h1:mU6zScU4U1YAFPHEHYk+3JC4SY7JxgkqS10ZOSyksNg= diff --git a/website/source/partials/builder/amazon/common/_AMIConfig-not-required.html.md b/website/source/partials/builder/amazon/common/_AMIConfig-not-required.html.md index 0b6827c20..f728b7564 100644 --- a/website/source/partials/builder/amazon/common/_AMIConfig-not-required.html.md +++ b/website/source/partials/builder/amazon/common/_AMIConfig-not-required.html.md @@ -59,6 +59,10 @@ copying a provisioned instance to an AMI. By default, Packer will keep the encryption setting to what it was in the source image. Setting false will result in an unencrypted image, and true will result in an encrypted one. + If you have used the `launch_block_device_mappings` to set an encryption + key and that key is the same as the one you want the image encrypted with + at the end, then you don't need to set this field; leaving it empty will + prevent an unnecessary extra copy step and save you some time. - `kms_key_id` (string) - ID, alias or ARN of the KMS key to use for boot volume encryption. This only applies to the main `region`, other regions where the AMI will be