Race in packer build using vmware-esxi.json

Bug #1867350 reported by Liam Young
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
Undecided
Unassigned

Bug Description

When running a packer build using vmware-esxi.json it continually fails for me. I believe the only place I have deviated from the instructions is that I am running the build on focal.

It seems that the /dev/nbd4 device is not ready immediately after the partprobe completes and so the subsequent mount command fails. I worked around this by editing the vmware-esxi.json and adding a 10s sleep after the partprobe and rerunning.

Revision history for this message
Liam Young (gnuoy) wrote :
Revision history for this message
Liam Young (gnuoy) wrote :

diff --git a/vmware-esxi.json b/vmware-esxi.json
index edd56ee..0cacf28 100644
--- a/vmware-esxi.json
+++ b/vmware-esxi.json
@@ -39,6 +39,7 @@
                 "qemu-nbd -d /dev/nbd4",
                 "qemu-nbd -c /dev/nbd4 -f raw -n output-qemu/packer-qemu",
                 "partprobe /dev/nbd4",
+ "sleep 10",
                 "mount /dev/nbd4p1 $TMP_DIR",
                 "mkdir -p $TMP_DIR/curtin",
                 "cp curtin-hooks $TMP_DIR/curtin",

Revision history for this message
Liam Young (gnuoy) wrote :
Revision history for this message
Lee Trager (ltrager) wrote :

A similar patch has been applied upstream at https://github.com/canonical/packer-maas

Changed in maas:
status: New → Fix Released
Changed in maas:
status: Fix Released → Fix Committed
Changed in maas:
status: Fix Committed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.