From 02bfac118f0ae1517c805d4c3c3e3915d621b666 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Tue, 9 Oct 2018 13:08:42 -0700 Subject: [PATCH 1/2] default wait time for amazon import to one hour. --- builder/amazon/common/state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/amazon/common/state.go b/builder/amazon/common/state.go index 3a78426ce..84adea957 100644 --- a/builder/amazon/common/state.go +++ b/builder/amazon/common/state.go @@ -208,7 +208,7 @@ func WaitForVolumeToBeDetached(c *ec2.EC2, ctx aws.Context, input *ec2.DescribeV func WaitForImageToBeImported(c *ec2.EC2, ctx aws.Context, input *ec2.DescribeImportImageTasksInput, opts ...request.WaiterOption) error { w := request.Waiter{ Name: "DescribeImages", - MaxAttempts: 300, + MaxAttempts: 720, Delay: request.ConstantWaiterDelay(5 * time.Second), Acceptors: []request.WaiterAcceptor{ { From 7698f7a4a63ad4ceba4a10ae56eb0e91386193d3 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Tue, 9 Oct 2018 13:40:08 -0700 Subject: [PATCH 2/2] update docs --- website/source/docs/post-processors/amazon-import.html.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/source/docs/post-processors/amazon-import.html.md b/website/source/docs/post-processors/amazon-import.html.md index 836a271c3..fc371e7c8 100644 --- a/website/source/docs/post-processors/amazon-import.html.md +++ b/website/source/docs/post-processors/amazon-import.html.md @@ -157,7 +157,9 @@ max retries or find yourself being rate limited, you can override the max retries and the delay in between retries by setting the environment variables `AWS_MAX_ATTEMPTS` and `AWS_POLL_DELAY_SECONDS` on the machine running the Packer build. By default, the waiter that waits for your image to be imported - from s3 waits retries up to 300 times with a 5 second delay in between retries. + from s3 will retry for up to an hour: it retries up to 720 times with a 5 + second delay in between retries. + This is dramatically higher than many of our other waiters, to account for how long this process can take.