Bugzilla – Bug 7060
mount+alter needs locking
Last modified: 2010-06-19 15:58:40
You need to log in before you can comment on or make changes to this bug.
If too many VMs are being started on the same machine at the same time, you can run into this: ioctl: LOOP_SET_FD: Device or resource busy Putting an flock in place fixes this. Also, the flock file descriptor redirection part here needs ">>" and not ">" because of "set -C" (thankyou Pierre). Otherwise you will get: "/var/lock/nimbus.mountalter.lock: cannot overwrite existing file"
Committed to master for 2.5 http://github.com/nimbusproject/nimbus/commit/ad454f9f1f15c89dc2af4ce8fbf247c45e7b80ad
Just for reference, apparently any way about it the losetup or mount commands both exihibit a race condition on the loop device selection. So flock at a higher level is the only way to go for us.