-
Committer:
Scott Moser
-
Date:
2012-12-14 15:45:34 UTC
-
Revision ID:
smoser@ubuntu.com-20121214154534-56r88wta1dpdjlmp
wait for nbd pid file to appear in /sys before continuing qemu-nbd connect
By waiting for the pid file to appear, I'm seeing that this is extremely
less likely to hit a race where the 'mount' fails because the system isn't
ready yet.
Doing a loop like this:
for((i=0;i<50;i++)); do
sudo ./mount-callback-umount \
-vv --system-mounts --system-resolvconf disk.img -- \
sh -c 'echo mounted at $1' -- || { echo "FAILED DUDE"; break; };
done
that will fail in 1 or 2 iterations on 12.04 without the check.
With this wait in place, I can run 2 of those loops (on separate images)
in parallel to completion.
the disk.img in question was a quantal cloud image (qcow2 compressed)