~ubuntu-core-dev/curtin:ubuntu-20.04

Last commit made on 2020-04-22
Get this branch:
git clone -b ubuntu-20.04 https://git.launchpad.net/~ubuntu-core-dev/curtin
Members of Ubuntu Core Development Team can upload to this branch. Log in for directions.

Branch merges

Branch information

Name:
ubuntu-20.04
Repository:
lp:~ubuntu-core-dev/curtin

Recent commits

a6cd01f... 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.

8ef4aba... 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

(cherry picked from commit 22172900d8090ba7f9e3110e80d9b63152d42cf7)
Signed-off-by: Dimitri John Ledkov <email address hidden>

1bf7eb5... by Łukasz Zemczak on 2020-04-22

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

(cherry picked from commit 47ff9886c1f715ceb7c85178090bcdab3326feda)
Signed-off-by: Dimitri John Ledkov <email address hidden>

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

f885a78... by Ryan Harper on 2020-04-21

unittest: do not allow util.subp by default

Bring over our util.subp mock from cloud-init. Rework unittest to
enable subp as needed.

LP: #1873913

22b505c... by Ryan Harper on 2020-04-20

curthooks: support multiple ESP on UEFI bootable systems

On debian systems we generate and set debconf selections values
to tell grub the set of configured devices. Also refactor
setup_grub to extract all UEFI boot partitions and determine
the primary ESP (mounted at /boot/efi). We include all ESPs
in the debconf selection for grub-[multi]-install to use.

Non-UEFI:
  grub-pc grub-pc/install_devices multiselect <devices>

UEFI:
  grub-pc grub-efi/install_devices multiselect <devices>

The grub-efi/install_devices is a new template value used for
handling multiple ESP partitions for boot resilience.

Curtin will check for the grub-multi-install tool and if
present will invoke that tool to install grub to all ESPs.

- Add block.schema update to allow partitions to set
  grub_device: True
- Refactor finding ESPs to prefer partition with grub_device,
  ESPs on disks with grub_device and fallback to grubcfg
  install_devices if we don't find one in storage config.

382af4b... by Ryan Harper on 2020-04-20

block-discover: handle missing multipath 'path' data, use DM_NAME

Probert's multipath data (maps and paths) is not always complete.
In some systems, the paths output may not include the required
mpath friendly name and instead use a serial number. In such
cases we can also check DM_NAME in the multipath device udev data
to extract the multipath_id that we can use to search for a member
device.

LP: #1873728

43db282... by Ryan Harper on 2020-04-20

lvm-over-multipath: handle lookups of multipath members

Subiquity provides a 'path' value for disks in storage config.
This triggered an edge case where curtin attempted to wipe the
underlying scsi disk *while* multipath is enabled resulting in
an error when attempting to get exclusive access to the disk.

This branch resolves this by checking if a disk or partition
is related to multipath and if so returning the device mapper
disk path.

LP: #1869075

2a03535... by Ryan Harper on 2020-04-20

block-meta: don't filter preserve=true devices, select by wipe

Now that wiping and preserving are independent values we consider
any disk or partition with a wipe setting for clearing holders.
An existing scenario where this matters is reusing a partition
which was previously part of a volume-group.

- Add a simplified vmtest scenario for reusing partition that
  was previously part of a volume-group

LP: #1837214

f681092... by Ryan Harper on 2020-04-20

vmtest: basic use dname to lookup disk with multiple partitions

This handles unstable scsi device names (sdc/sdd) which shuffle around
from time to time; instead look up the assigned name via the dname
value. This should fix vmtest failures on BasicScsi on ppc64le/arm64.