~raharper/curtin:fix/schema-add-raid-metadata

Last commit made on 2019-10-07
Get this branch:
git clone -b fix/schema-add-raid-metadata 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/schema-add-raid-metadata
Repository:
lp:~raharper/curtin

Recent commits

8ad14f0... by Ryan Harper

block-schema: update raid schema for preserve and metadata

Curtin can now accept type: raid storage config which sets the
preserve key booloean to keep a raid configuration and separately
set the 'wipe' key to clear the data on the raid device.

We also accept a 'metadata' version hint in the schema as curtin
passes this value along as info to users of block-discover.

e174e1c... by Ryan Harper

clear-holders: increase the level for devices with holders by one

In the case where clear-holders looks at a dependent device, if the
parent is already in the registry, we want to take the max level
and then increment this by one to ensure the dependent device is
shutdown first. This resolves the case where we have an LVM over
top a bcache device and we need to remove the LVM device before
any of the bcache devices can be removed as they may share a
cacheset in which case all bcache devices must be stopped before
the cacheset can be removed.

LP: #1844543

be56339... by Chad Smith

tests: mock timestamp used in collect-log file creation

The unittest for curtin collect-logs uses a timestamp to
create the filename for the tarball. The selected in the
unittest versus when the call occurs may race if the delay
between the calls is greater than 1 second. Resolve this
unittest issue by providing the same timestamp value.

LP: #1847138

b83131f... by Ryan Harper

ChrootableTarget: mount /run to resolve lvm/mdadm issues which require it.

Newer lvm/mdadm/grub tools are expecting to find udev and other
information /run, so remove the Centos only change to add /run
and instead have ChrootableTarget always mount /run.

826e89d... by Ryan Harper

block-discover: handle multipath disks

Update block-discover to annotate disks and partitions that are
part of a multipath device. Using probed data, curtin now
includes a 'multipath' key in type:disk and type:partition entries.
This allows readers of extracted config to understand the
duplicated information present.

Other changes:
 - Update block schema to accept 'multipath' string
 - Update documentation for storage 'multipath' string
 - Update block-discover-to-config tool to handle probe data
   without 'storage' top level key.
 - Add unittests for multipath detection in probe data.

LP: #1839915

7a22938... by Ryan Harper

Handle partial raid on partitions

Consider disks and partitions when checking for holders that
need removal before they can be used. Additionally when shutting
down a raid, if it is inactive or broken, writes to the /dev/mdX
device will fail which is expected, don't exit instead, log a
non-fatal error and continue with shutting down the raid.

With these fixes TestReuseRAIDMemberPartition vmtests now pass.

LP: #1835091

489c014... by Ryan Harper

install: export zpools if present in the storage-config

Curtin needs to run zpool export on the any pool it created
before booting as zfs-initramfs 0.8 now requires a pool to
be exported before being imported.

LP: #1838278

86ede8a... by Ryan Harper

block-schema: allow 'mac' as partition table type

On PPC64, the partition table on the live iso is 'mac'.
Add this value to the partition type schema.

LP: #1845611

390efbb... by Paride Legovini

jenkins-runner: disable the lockfile timeout by default

When CURTIN_VMTEST_IMAGE_LOCK_TIMEOUT is set to a negative integer
disable the lockfile timeout. By default set it to -1 (no timeout).

Rationale: while it is useful to have a timeout, there is no
sensible default. In a run like (parameters omitted):

  $ jenkins-runner &
  $ vmtest-sync-images &
  $ jenkins-runner

the second jenkins-runner will have to wait for the first one to
finish, as it's locked by vmtest-sync-images. A full vmtest run
can take several hours. I easily spotted successful runs that
took more than 16 hours on our Jenkins log. Setting the default
timeout to something like 20 hours should be safe, but I still
don't think it's a good default, as it is too high for all the
cases where only a subset of the tests is being run. The timeout
is too dependent on the hardware, on how busy the server is,
and on the set of tests which is run. No size fits all.

Other minor changes:
 - Force CURTIN_VMTEST_IMAGE_LOCK_TIMEOUT to be an integer
 - Remove unnecessary quotes around fixed strings

6c0ca57... by Dan Watkins

curthooks: use correct grub-efi package name on i386

i.e. grub-efi-ia32 instead of grub-efi-i386.

LP: #1845914