Paul, I pulled this.
There is actually lots of errors when requesting partition re-read.
I'm not sure on 14.04, but in newer releases of udev, it actually is watching 
RW open on block devices, and whenever a close of such a file descriptor 
occurs, it requests a reread.

see /lib/udev/rules.d/60-block.rules

The end result is if you do something like:
  wipefs --all /dev/sdb
  blockdev --reread-pt /dev/sdb

I just verified this on 16.04 kvm vm:
sudo sh -c 'dev=/dev/vdb; echo 2048, > sfdisk_in; while :; do sfdisk $dev 
<sfdisk_in && blockdev --rereadpt $dev || break; done'

eventually you'll see:
blockdev: ioctl error on BLKRRPART: Device or resource busy

Fun, eh?

-- 
https://code.launchpad.net/~paul-meyer/cloud-init/+git/cloud-init/+merge/304033
Your team cloud init development team is requested to review the proposed merge 
of ~paul-meyer/cloud-init:fix-raw-ephemeral-disk into cloud-init:master.

_______________________________________________
Mailing list: https://launchpad.net/~cloud-init-dev
Post to     : cloud-init-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~cloud-init-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to