~raharper/curtin:fix/get-path-to-storage-mpath

Last commit made on 2019-05-10
Get this branch:
git clone -b fix/get-path-to-storage-mpath https://git.launchpad.net/~raharper/curtin
Only Ryan Harper can upload to this branch. If you are Ryan Harper please log in for upload directions.

Branch merges

Branch information

Name:
fix/get-path-to-storage-mpath
Repository:
lp:~raharper/curtin

Recent commits

29a6e47... by Ryan Harper

partition_kname: clarify comment, remove 'dm' from dev_type

6c59191... by Ryan Harper

use is_mpath_partition, streamline use of udevadm_info

5b58a46... by Ryan Harper

Add unittests for block.multipath

7608297... by Ryan Harper

Use DM_NAME to find mpath members

37be622... by Ryan Harper

Add RuntimeError if multipath device can't find id.

177ca70... by Ryan Harper

Handle multipath friendly names and add retries to removal commands

In some images (like Disco), multipath is installed and enabled with
friendly names. In such a case, multipath -f only works when supplied
with the friendly name versus the WWID. Additionally, when removing
multipath partitions, the dmsetup and multipath commands may fail with
"device is busy" initially, adding retries has made this more reliable.

Finally, if retries fail, we will wait for removal which will trigger
a failure if we reach the path and the device is still present.

13dab7b... by Ryan Harper

unittest: mock block.multipath for lookup_disk

7d0400a... by Ryan Harper

block: add multipath module, integreate in lookup and clear-holders

Multipath devices require more care when clearing. Generally it's
not recommended to partition a multipath device. The accepted
practice is to create partitions on one of the path devices while
the multipath devices is unmapped. Afterward, the multipath device
can be reformed and will handle creating the required device mapper
entries for the partitions.

When curtin encounters a multipath partition during a clear-holders
operation, we remove the device member device. When working with
the base multipath device itself, we will flush its mapping.

Lastly when looking up disks by serial, we detect if the resolved
by-id symlink is a multipath device, query the device path members
and select the first sortorder path.

3e7aa34... by Ryan Harper

mpath: collect all mapper DEVLINKS, trigger settle and wait for removal

When removing a partition on a multipath device, we need to trigger
settle to ensure remove is successful, and then because there are
many device links and rules involved, we want to settle after the
remove and use our wait_for_removal code to check that each link
was removed before proceeding.

e10e25c... by Ryan Harper

vmtest: only 3 extra disks needed, use different sizes to help identify.