~mwhudson/curtin:lp-1868177

Last commit made on 2021-03-23
Get this branch:
git clone -b lp-1868177 https://git.launchpad.net/~mwhudson/curtin
Only Michael Hudson-Doyle can upload to this branch. If you are Michael Hudson-Doyle please log in for upload directions.

Branch merges

Branch information

Name:
lp-1868177
Repository:
lp:~mwhudson/curtin

Recent commits

c3800f7... by Michael Hudson-Doyle

add a tiny partition to a randomly selected vmtest

62bf639... by Michael Hudson-Doyle

remove strict argument from quick_zero too

bb8b718... by Michael Hudson-Doyle

remove strict argument to block.wipe_volume

It was only passed by clear_holders._wipe_superblock and clear_holders
is all best effort anyway.

in particular, this should fix failures seen in subiquity error reports
when wiping very small (<1M) partitions.

LP: #1868177

e113b05... by Michael Hudson-Doyle

storage_config: return one type: disk action per multipathed disk

Currently extract_storage_config returns one type: disk action
for every member of a multipathed disk and type: partition
actions for each partition of each disk. This works by generating
a type: disk action for each disk and ignoring the block device
data for the /dev/dm-X device for the multipathed disk.

But in groovy+, the udev rule from multipath-tools that has
always attempted to remove the devices nodes for the partitions
of a disk that is a multipath member actually succeeds, and
trying to generate a type: partition action for a partition with
no underlying device node makes things blow up.

Instead, this branch generates type: disk and type: partitions
actions from the /dev/dm-X nodes for the mutipathed disk and its
partitions, and ignores and disks and partitions that are members
of a multipathed disk.

LP: #1893818

f69ae88... by Ryan Harper

vmtest/centos: handle different paths to grub config

Centos images used to always have grub installed at
/boot/grub/grub.conf. The most recent build of centos70,
centos70/amd64/20210210_01/root-tgz, now has grub conf located at
/boot/grub2/grub.cfg. This patch checks for either path before
running the sed fixup command.

d3a86fe... by Michael Hudson-Doyle

Release 21.2

Bump the version in curtin/__init__.py to 21.2.

LP: #1913357

818db25... by Michael Hudson-Doyle

Revert "apt_config: stop using the deprecated apt-key command"

This reverts commit e099e32c5757b7aa0bc4fc2aeddb91d195a6df2b.

Unfortunately the gpg keys are not being added to the right place on
disk.

LP: #1912801

45877d0... by Michael Hudson-Doyle

partition_handler: fix NameError when reusing a vtoc partition

56cc9cc... by Dimitri John Ledkov

install_grub: convert in-target EFI loader path to ESP path.

When calling efibootmgr convert esp-mount/efi-loader to efi-loader path,
as efibootmgr variable needs to be relative to the ESP mount point root,
rather than the in-target root.

LP: #1906379

53ac301... by Michael Hudson-Doyle

block: fixes for verifying existing multipath partitions

Verifying a partition on a multipath disk currently fails for two
reasons:

 1. get_blockdev_for_partition does not know how to go from a multipath
    partition to a multipath disk, so sfdisk_info ends up calling sfdisk
    on the partition, which fails.
 2. sfdisk --json /dev/dm-X prints /dev/mapper paths for the partition
    paths but compares them against the fully deferenced /dev/dm-Y path
    for the partition.

2 is easily fixed by resolving symlinks before comparing nodes. 1
can be fixed with a little udev poking but then sys_block_path
returns paths like /sys/class/block/dm-1/dm-2 for a partition of
a multipath disk, which doesn't exist. Luckily, nodes for
partitions exist directly in /sys/class/block and have done since
/sys/class/block was added in 2008 (see kernel commit
edfaa7c36574f1bf09c65ad602412db9da5f96bf) so we can just remove
the call to get_blockdev_for_partition from sys_block_read.