~raharper/curtin:fix/kick-uefi-lvmroot-xfsboot-can

Last commit made on 2018-03-21
Get this branch:
git clone -b fix/kick-uefi-lvmroot-xfsboot-can 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/kick-uefi-lvmroot-xfsboot-can
Repository:
lp:~raharper/curtin

Recent commits

9228792... by Ryan Harper

vmtests: extend skip_by_date for lvmroot_xfsroot and network_mtu

Reported bugs are not yet fixed, move out by 3 months, post
18.04 for possible fix.

bb2d120... by Ryan Harper

Add pollinate user-agent configuration support.

The pollinate client in Ubuntu images supports custom data to be
appended to the user-agent value sent when contacting the pollen
server. This patch allows users to add any key/value pairs which
will be added to the pollinate client configuration.

By default, curtin will configure pollinate with the curtin version
and if being deployed by MAAS, the MAAS version. Users can also
disable configuration of the pollinate client.

Additionally fix the vmtest webhook logger to encode writes when
handling GETs.

1a5fe18... by Scott Moser

vmtest: Remove xenial and trusty specific workaround for rooturl.

xenial and trusty required specifying rc-initrd-dns on the kernel
command line in order to enable dns transition from initramfs to
real root (rooturl). Those changes are now fixed in both releases
so we can remove this code.

The changes made the archive today. We would expect they
are in any daily image with a serial newer than that 20180212.

5b7ca31... by Scott Moser

vmtest: Add Filesystem Battery test.

This test exercises filesystem creation, mount and unmount of all
supported filesystem types.

Also here is a fix for jfs filesystem creation. mkfs_jfs requires a '-q'
argument to force/quiet. Otherwise it will prompt to ask if you
really want to do that.

4502543... by Scott Moser

Remove grub2/xenial specific workarounds for zfsroot.

This removes the workarounds that were put into place for installation
of zfs on xenial. With the fix of bug 1527727, they are no longer
necessary.

61469b5... by Ryan Harper

Disable dirty_disks mode for mdadm + iscsi tests

Two issues with dirty_disk mode. First, after the early
stage runs, we need to tear down the raid array so we can
disconnect the iscsi devices, second even when that is done
there is a bug in mdadm version in Artful and Bionic which
prevents successful testing (LP: #1753786)

66c3dc7... by Scott Moser

tools/curtainer: Try harder to get source at binary version.

When we test curtin from the daily PPA, sometimes the source version
that is available is newer than the binary version available. That
causes mismatch of vmtest:code.

If 'apt-get source curtin/<version>' fails, then ask apt
what the url to the deb for 'curtin' at 'version' is.
Then replace _all.deb with .dsc and try dget on that url. This
should work because:
a.) curtin is a binary and a source package.
b.) source are generally published along side binaries.
c.) in the ppa case, the files are likely still available but only
    the most current is published in the Sources for the archive.

If this proves to not work, then the next solution is to actually
provide a binary package with the files needed for vmtest.

46f8000... by Ryan Harper

clear_holders: wipe complex devices before disassembly

The curtin clear-holders code did not wipe the contents of the
assembled devices prior to shutting them down. In cases where
curtin re-assembles the same devices, in a RAID for example, then
when the RAID device comes on-line, it may prevent some tools from
creating new metadata on the target device. In particular, the bcache tools
do not want to overwrite an existing bcache superblock resulting in
a failed deployment when layering a bcache over a RAID volume.

The fix is in two parts. First, clear-holders will wipe the superblock of
the assembled device before it breaks it apart. Second, when creating a
bcache backing device, check first if the target device is already claimed
by the bcache layer; if so then raise a RuntimeError as clear holders should
have removed this device.

curtin.block
 - expose 'exclusive' boolean and pass it through to context manager

curtin.block.clear_holders
 - Add logic to wipe assembled devices before calling shutdown function
 - introduce internal _wipe_superblock which only contains the retry
   logic
 - switch to using dmsetup remove for lvm destruction
 - improve identify_raid, it incorrectly identified partitions on RAID0 and
   RAID1 devices as raid devices, but they are actually partitions.

LP: #1750519

1deb9d8... by Ryan Harper

vmtests: network_mtu: fix bug number and move date out one month

The bug number on the network_mtu skip_by_date for missing IPV6 MTU support
in netplan/networkd was off-by-one; fix that and move date out one more month.

a6145f9... by Ryan Harper

fix /usr/bin/curtin exit code in install failure

When curtin encounters an error during the 'install' stage, the default
configuration enables collecting of system logs. The collect_logs function
'create_log_tarfall' included a sys.exit(0) which should only be part of the
'collect_logs_main' method; this resulted in failed installs exiting with a
return code of 0. The fix is to move the sys.exit(0) up to the main method.

LP: #1751176