~mwhudson/curtin:fix-multipath-partition-verification-2

Last commit made on 2021-01-19
Get this branch:
git clone -b fix-multipath-partition-verification-2 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:
fix-multipath-partition-verification-2
Repository:
lp:~mwhudson/curtin

Recent commits

283184e... by Michael Hudson-Doyle

oops

3cb7c3e... by Michael Hudson-Doyle

update docstring, robustify

9cbfc98... by Michael Hudson-Doyle

adapt a currently unused function in multipath to be useful for get_blockdev_for_partition

8c6388a... by Michael Hudson-Doyle

fix (and simplify!) some tests

dff1d65... 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 sysfs yoga 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 exists. Luckily, nodes for partitions exist directly in
/sys/class/block and have done since /sys/class/block was added in 2008:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=edfaa7c36574f1bf09c65ad602412db9da5f96bf
so we can just remove the call to get_blockdev_for_partition from
sys_block_read.

2bd333b... by Michael Hudson-Doyle

Release 21.1

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

LP: #1911841

756d3d8... by Mark Klein

This adds arm64 compatibility for RH installations

The current behaviour for Redhat based installs assumes x86_64
arch for grub. This change queries the target arch and makes
decisions on packages based on that.

b1312b5... by Ryan Harper

vmtest: add Hirsute release classes, tool to add vmtest class

Add a tool to generate new release classes based on a previous
release, for example:

  ./tools/vmtest-add-release -p tests/vmtests \
    --previous-release=focal --distro-release=hirsute

User still needs to create the release class in tests/vmtests/releases.py

e387c74... by Ryan Harper

vmtest: fix image-sync after maas URL stream rename

Image syncing for vmtest has been failing since MAAS renamed their
daily image stream to stable. In an effort to keep the 'daily' URL
valid the website redirects this to 'stable' path. However the content
was also modified and includes references to files and URLs which have
the 'stable' name included. This broke vmtest image sync which expected
the 'daily' string to be present in filenames and content.

The observable result was that curtin would attempt to find content it
had just *synced* to /srv/images but when searching, it would load up
the cached content files which only referenced the 'daily' stream data
and would indicate that the target file was missing.

This branch moves vmtest to using the 'stable' maas image stream
directly. This value is controllable via an environment variable,
MAAS_IMAGE_STREAM, if set will be used to compose the IMAGE_SRC_URL
and the STREAM_BASE variable which is used to find cached content in
/srv/images/.vmtest_data/ directory.

LP: #1908543

404b035... by Michael Hudson-Doyle

storage_config: set ptable to vtoc for 'virt' dasds as well as 'ECKD'