Comment 3 for bug 765843

Revision history for this message
Neil Wilson (neil-aldur) wrote :

The 'wait-for-root' command won't guard for the events that the BLKRRPART ioctl generates.

BLKRRPART generates the following:

ubuntu@srv-hgww8:~$ sudo udevadm --debug monitor --udev
run_command: calling: monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing

UDEV [1303300813.480716] remove /devices/pci0000:00/0000:00:06.0/virtio3/block/vdb/vdb1 (block)
UDEV [1303300813.538753] change /devices/pci0000:00/0000:00:06.0/virtio3/block/vdb (block)
UDEV [1303300813.570692] add /devices/pci0000:00/0000:00:06.0/virtio3/block/vdb/vdb1 (block)

The 'wait-for-root' command is written presuming that there is no device entry in the database and you're just waiting for it to arrive. If it runs before the kernel has queued or processed the 'remove'event, then it will succeed in any event.

The mount will then fail if it runs after the 'remove' event but before the 'add' event completes.