Comment 40 for bug 1869075

Revision history for this message
Ryan Harper (raharper) wrote :

OK, I believe I've recreated the issue.

Curtin recently changed to clear off any device which had a wipe: enabled. In this recent test, this was set on the disk and the partition, curtin generated a list of block devices to clear:

/dev/mapper/mpatha, /dev/mapper/mpatha-part1

The problem... and it's not easy to see in error path, is that /dev/mapper/mpatha-part1 *does not* exist yet, because we've not created it; it's not an existing partition ...

I've recreated this in our multipath scenario by setting wipe: superblock on those partitions.

The fix on the curtin side is to filter out devices that do not exist from the clear-holders list of things to clear.

In the process, I uncovered a few other issues:

1) block_meta.get_path_to_storage_volume would iterate through all disk search keys (wwn, serial, device_id, path) even if we found the disk with a previous key; we now break out of the loop as soon as we've found a disk

2) Sometimes we call kpartx too soon after running parted to create a partition. We fix this by calling udevadm settle to ensure the events have been processed before we update the kernel's device map with the partition.

I should have an MP up in a bit.