~smoser/curtin:cleanup/remove-rc-initrd-dns

Last commit made on 2018-03-07
Get this branch:
git clone -b cleanup/remove-rc-initrd-dns https://git.launchpad.net/~smoser/curtin
Only Scott Moser can upload to this branch. If you are Scott Moser please log in for upload directions.

Branch merges

Branch information

Name:
cleanup/remove-rc-initrd-dns
Repository:
lp:~smoser/curtin

Recent commits

23f8437... 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.

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

82622f1... by Ryan Harper

docs: Document use of format command with fstype: zfsroot

Add documentation for use of 'zfsroot' in the format command.
Note that zfsroot support is experimental. Include an example
zfsroot configuration.

91d01f2... by Scott Moser

docs: Add HACKING.rst doc to top level dir and readthedocs.

This adds a general 'HACKING.rst' document to the top level curtin
directory and also publishes that content into readthedocs.io.

Also drops the obsolete 'development.rst'.

e9d183e... by Ryan Harper

vmtest: fix centos root-tgz image sync

Remove all remaining uses of vmtest.root-tgz as part of our local mirror.
This fixes syncing of centos images which use ftype: root-tgz.

7c42923... by Scott Moser

block_meta: Ensure offset input to sgdisk are integers.

Looking at a install log, I saw commands executed like this:
   sgdisk --new 2:1050624.0:7342079.0 --typecode=2:8300 /dev/vda

This change fixes both of the '.0'. All other values that were used
in the math were already integers.