Last commit made on 2018-05-17
Get this branch:
git clone -b fix/clear-holders-refactor 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


Recent commits

374a1ff... by Ryan Harper

Fix remaining clear-holder issues with rescanning partitions and iscsi devices

Moving the scan to run before issuing the next shutdown command satisfies the
LVM scenario where msdos extended partitiosn disappear and further we need to
always trigger the automatic mode for iscsi devices as the iscsiadm discovery
reconfigures the defaults.

f9b2ef5... by Ryan Harper

Drop mdadm_ prefix on newly added mdadm methods.

fcb3775... by Ryan Harper

use combine_capture=True to merge sfdisk stderr output into logged msg.

a032d77... by Ryan Harper

Switch to using block.quick_zero(path, partitions=False)

f3eb081... by Ryan Harper

Change suppress=False to warn_on_fail=True

0f2f6d8... by Ryan Harper

block/clear_holders/mdadm: refactor handling of layered device wiping

The block layer hanlding of checking efi/dos signatures did not ensure
that it always used a devpath (/dev/<kname>) which resulted in
failures when attempting to identify dos partitions, including
extended partitions due to attempting to open /sys/class/block/<kname>
to look for metadata. In addition there is a window where
wiping/removing lvm devices in dos logical partitions renders the
/dev/<kname> path to the extended partition missing, no /dev/<kname>
We now re-read a block device's partition table after completing a
shutdown of each device. Doing this re-read triggered mdadm devices
which had been stopped to resume preventing wiping of the underlying
devices. A refactor of how raid devices are shutdown now includes
collecting the list of raid members and spares, failing each element
out of the array, stopping the rescan/rebuild of the array and finally
removing the mdadm metadata on the underlying devices.

With this in place, we can now successful run the LVM test-cases with
dirty_disk mode enabled and simultaneously continue to pass the
complex bcache/raid examples.

LP: #1768893
LP: #1769742

736808c... by Ryan Harper

clear_holders: only export zpools that have been imported

Curtin may encounter disks from a previous install which are
zfs_members but are part of a pool which isn't currently
imported. Attempting to export a pool that is not imported
results in a failure. Instead, only export a pool if it's
found in the list of currently imported pools.

Also enable Bionic ZfsRoot vmtest (BionicTestZfsRootFsType)
LP: #1770280

6d6c396... by Ryan Harper

vmtests: allow env control of apt, system_upgrade, package upgrade

Add environment variables to support adding repositories, toggling
system_upgrade boolean, and installing packages.

This supports several use-cases where we want to test if a package
fixes an issue found in vmtest.

  Comma separated list of repos to add via apt: config
  Typically in the form: ppa:lpuser/pocket but also supports
  'proposed' to generate a sources entry for adding that pocket.
  extend the apt syntax to allow for the string 'proposed' to turn

  Enable curtin's system_upgrade feature, default value is 0
  If there are values in CURTIN_VMTEST_ADD_REPOS, this will default to 1.
  Users may use ADD_REPOS and disable system_upgrade by setting value
  to 0.

  Comma separated list of packages that will be installed/upgraded
  in a late command.

Lastly, allow ./tools/jenkins-runner to take CURTIN_* declarations
on the command line. This makes it easier to feed these to a manually
run jenkins run.

c8209ef... by Ryan Harper

util.get_efibootmgr: filter bootorder by found entries

In some cases a previous EFI configuration may reference boot
items that are no longer present which results in curtin
invoking efibootmgr with invalid parameters:

% efibootmgr -o 0001,0000,3000,2001,2002,2003
Invalid BootOrder order entry value0001,0000,3000,2001,2002,2003

Curtin will update the the order list by dropping any elements
that don't have an actual boot entry.

LP: #1767584

95813f2... by Ryan Harper

vmtests: adjust lvm_iscsi dnames to match configuration

Previous to dname/bcache changes, we failed to check the correct dname

In test_lvm.py we included a test_dname override to prevent checking dname
on trusty but it failed to call the parent class if we weren't skipping.

Commit 12d7163cea8, make_dname, replaced all of the per-subclass checks
for trusty and added the SkipTest to the base class implementation which
then showed the error.

This change adjusts the dnames to match what's actually generated.