Packer: amazon-chroot mount_partition option does not allow to mount entire device

Created on 23 Apr 2018  ยท  4Comments  ยท  Source: hashicorp/packer

The amazon-chroot builder works incorrectly with EBS volumes on HVM instances: the builder, relaying on mount_partition option default behavior introduced in 460e2da2485d1392b6a28103e37f98331d85e625 and patched in 09543fc4e7de662488974178d8979083ec99bc04, attempts to mount /dev/xvdf1 while there is no such partition and entire /dev/xvdf must be mounted.

Problem lines:

It will be fine to have an ability to manage this out by using template variables, for example, by changing default behavior for mount_partition option as described in this patch.

Environment, logs and how to reproduce:

  • Packer version: 1.2.2
  • Host platform: AWS Debian 7 Wheezy (source AMI ID: ami-61e56916)
  • Debug log output is here
  • The example template and scripts needed to reproduce the bug can be found here
bug buildeamazon

Most helpful comment

This wasn't a duplicate of 5848 after all, but I was able to fix it pretty easily thanks to your investigation; it'll be closed by #6194

All 4 comments

I believe this is a duplicate of #5848; your patch might be useful in addressing these. I'm closing this as a duplicate and copying @mwhooker who was looking into the original issue.

By the way -- this issue and repro case are probably the most beautiful issue I've ever seen. Thank you for doing such a thorough job of making it easy for me to reproduce.

This wasn't a duplicate of 5848 after all, but I was able to fix it pretty easily thanks to your investigation; it'll be closed by #6194

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings