the recreate script demonstrates failure on xenial, artful and bionic in a VM.
xenial needs a change to mount-image-callback to run 'blockdev' on the nbd device. i'm not actually sure how i've never seen that bug before.
with the change in place, all 3 can be made to show the issue. artful and bionic vms are actually somewhat reliable, but if you run two copies of the script concurrently it will fail.
the recreate script demonstrates failure on xenial, artful and bionic in a VM. callback to run 'blockdev' on the nbd device. i'm not actually sure how i've never seen that bug before.
xenial needs a change to mount-image-
with the change in place, all 3 can be made to show the issue. artful and bionic vms are actually somewhat reliable, but if you run two copies of the script concurrently it will fail.
=== modified file 'bin/mount- image-callback' image-callback 2018-01-03 15:44:47 +0000 image-callback 2018-01-04 17:19:37 +0000
--- bin/mount-
+++ bin/mount-
@@ -316,6 +316,7 @@
fi
i=0
i=$(( $i+1))
+ [ -b "$mdev" ] || blockdev --rereadpt $nbd
while :; do
[ -b "$mdev" ] && break