~raharper/curtin:feature/add-unittest-multipath-part-handler

Last commit made on 2020-04-23
Get this branch:
git clone -b feature/add-unittest-multipath-part-handler 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:
feature/add-unittest-multipath-part-handler
Repository:
lp:~raharper/curtin

Recent commits

bfe1f0a... by Ryan Harper on 2020-04-23

Add unittests for CalcDmPartitionInfo, tox fixes

4ce53ce... by Ryan Harper on 2020-04-22

Add unittests for CalcPartitionInfo

ac22b0a... by Ryan Harper on 2020-04-22

Add unittest for multipath partition handler kpartx path

ec598b0... by Ryan Harper on 2020-04-22

multipath: attempt to enforce /dev/mapper/mpath files are symlinks

Multipath device scanning and bring up variablity may result in
the creation of /dev/mapper/mpath* files that are block devices
instead of a symlink to the device mapper device (/dev/dm-0).

When these block files are present, this breaks assumptions in
curtin used to look up details in sysfs for a mapper device.

d39b9af... by Ryan Harper on 2020-04-22

block-meta: device mapper partitions may be block devices not links

In some cases the multipath library may create a block device which
is not a symbolic link to the device-mapper dev[1]. Curtin expects the
symlink. Remove the non-symlink file and allow kpartx to create it.

1. https://bugzilla.redhat.com/show_bug.cgi?id=869253

2f22690... by Ɓukasz Zemczak on 2020-04-22

Default to dm_name being id if empty earlier in dm_crypt_handler()

In other parts of the code, when deciding the path for dmcrypt_dev,
we default to 'id' when 'dm_name' is not defined. We ideally want
that to happen in all the cases. The defaulting has been there
already but a bit too late.

LP: #1874243

bcf890b... by Chad Smith on 2020-04-22

storage: correct declared schema draft version for storage schema

python3-jsonschema 3.2 (Ubuntu Focal) pays attention to the $schema
version declared in the provided schema when choosing validators.

Curtin now sets that appropriate schema draft version as 4 instead of
7 to give us better schema errors.

0ab8c80... by Dan Watkins on 2020-04-22

test_clear_holders: add missing zfs mock

0cd6569... by Ryan Harper on 2020-04-22

Mock out zfs_supported to prevent attempting to load kernel modules

6ddbf74... by Ryan Harper on 2020-04-22

block-meta: skip wipe device paths if not present

Curtin extracts the devices from storage config with wipe enabled.
These devices may not exist yet (curtin will be creating them) so
there's no need to clear them, instead drop them from the list of
devices to send to clear-holders.

Other changes:

multipath:
 - Clarify multipath logging on device type checking
block-meta:
 - Stop iterating through disk lookup keys after we find one
 - Use udevadm_settle after parted partition creation before
   calling kpartx to prevent race with kernel partition update
clear-holders:
 - Log the inputs to clear-holders
block:
 - Log a warning when sys_block_path is called on a non-existent
   device path.
 - Log the return value from block.lookup_disk()

LP: #1869075