~raharper/curtin:fix/vmtest-bcache-missing-environ-vars

Last commit made on 2019-12-17
Get this branch:
git clone -b fix/vmtest-bcache-missing-environ-vars 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/vmtest-bcache-missing-environ-vars
Repository:
lp:~raharper/curtin

Recent commits

6752bbd... by Ryan Harper

Missed an unset of OUTPUT_FSTAB, set it to the tmp path

e7952f6... by Ryan Harper

clear-holders: handle arbitrary order of devices to clear

At some point, the vmtest for LVM over bcache device list to clear
was sorted in a way that exposed a bug in the level calculation
resulting in not determining that the LVM device must be shutdown
before the bcache layer.

Resolve this by three changes: First we now sort the holders trees so
we have a consistent plan. Second when adding devices to the shutdown
registry, if the device has not been seen we take the max of either the
current level, or the size of the devices holders and lastly, the level
calculation requires recursion to find the full depth rather than just
taking the length of the holders list.

04adfd9... by Ryan Harper

curthooks: only run update-initramfs in target once

During an installation of Ubuntu; various packages (linux-image,
zfs-initramfs, mdadm, multipath-tools, etc) require an update
to the initramfs contents to ensure configuration details are
available. In the worst-case we call update-initramfs three
or more times. This branch disables update-initramfs in the
target system by moving it out of the way; then it replaces
the update-initramfs binary with equivalent of /bin/true as
some package's post-install hook call update-initramfs directly
and fail without it being present. At the end of curthooks
curtin re-enables the original update-initramfs and ensures
that all kernels installed will have an initrd.img created
or updated as needed.

Additional changes:
- block_meta
  - enable strict=True loading of command environment state
    to ensure curtin has required state present.
  - Replace open-coded file writing with util.write_files
    for mdadm and crypttab.
- curthooks
  - Use dpkg-divert to check if update-initramfs has been
    diverted.
  - Move update-initramfs actions (redhat & debian) under
    the same event reporter.
- vmtests
  - Don't unset OUTPUT_FSTAB, instead provide an alternative
    location.
  - Move class-based extra_kernel_args to the end; some
    class configs specify '---' which affects the
    carry-over kernel parameters used when booting the
    installed image.

LP: #1842264

3155c33... by Dan Watkins

test_network_mtu: bump fixby date for MTU tests

8c4b225... by Ryan Harper

block-discover: don't skip partitions on virtual devices

Curtin ignored virtual devices when processing blockdev data
on disks and partitions, however, some virtual devices may also
be partitioned (e.g. raid, bcache). This caused the storage
configuration to not include the base raid and partition elements
resulting in an invalid configuration.

LP: #1853018

c9112d4... by Ryan Harper

block-discover: handle partial probe data

The probe_data provided to curtin may only include a subset of
the types of data that curtin knows how to parse. Currently if
one of the types is not present in the probe_data, curtin raises
Exceptions which prevent callers from getting any storage config
from curtin. This branch allows curtin to handle missing data
and will log the errors but not raise Exceptions, leaving the
caller to handle and decide what to do with the storage config
produced.

LP: #1852351

95197ff... by Daniel Fox <email address hidden>

Fix parsing of squashfs: uri prefix for installation sources

util.santitize_source was truncating uris which used the squashfs:
prefix by taking the index of a character rather than a slice starting
at that character. This changes fixes this issue and provides the
intended behaviour and adds a deprecation warning to point to
the supported URI: "squashfs://".

LP: #1851271

48a476b... by Ryan Harper

Release 19.3

Bump the version in curtin/__init__.py to be 19.3.

LP: #1851390

a586514... by Ryan Harper

Update HACKING.rst with Josh Powers contact info.

8e618b3... by Paride Legovini

t/jenkins-runner: replace $EPOCHSECONDS with 'date +%s'

The $EPOCHSECONDS variable has been introduced in Bash 5, and we
need jenkins-runner to stay compatible with Bash 4 for the moment.