• Dan Schaffer's avatar
    builder/amazon/chroot: fix no attachments on volume error. · 03436a37
    Dan Schaffer authored
    This adds retry logic to the amazon/chroot builder.  The builder
    intermittently fails when ec2conn shows the volume in the attached
    state but calling Volumes[0].Attachments return an empty array. The
    fix adds a retry logic for when Volumes[0].Attachments has len 0 sleep
    for 2 seconds and retry up to 30 times.
    
    When the Volumes[0].Attachments is empty I find within 5 seconds the
    Volumes[0].Attachments contains the correct value.
    
    The issue is reported in:
    https://github.com/mitchellh/packer/issues/1854
    03436a37
step_attach_volume.go 3.6 KB