~mpontillo/curtin:fix-kexec-doc-bug

Last commit made on 2020-01-10
Get this branch:
git clone -b fix-kexec-doc-bug https://git.launchpad.net/~mpontillo/curtin
Only Mike Pontillo can upload to this branch. If you are Mike Pontillo please log in for upload directions.

Branch merges

Branch information

Name:
fix-kexec-doc-bug
Repository:
lp:~mpontillo/curtin

Recent commits

106281a... by Mike Pontillo <email address hidden>

doc: Fix kexec documentation bug.

1be1cd7... by Lee Trager

centos: Add centos/rhel 8 support, enable UEFI Secure Boot

This branch adds support for deploying CentOS and RHEL 8 images. As a
side effect this also enables secure UEFI boot for CentOS 7 when the
grub2-efi-x64 package is installed.

LP: #1788088

f02fd61... by Ryan Harper

Bump XFS /boot skip-by date out a while

78678e2... by Ryan Harper

vmtest: Fix a missing unset of OUTPUT_FSTAB

The initramfs-only-one branch modified how we use "dirty-disk" mode
which previously had unset environment variables used by curtin,
OUTPUT_FSTAB; this had some undesirable side-effects and instead
we set OUTPUT_FSTAB to a tmpdir and block-meta will now verify
expected environment variables. We missed a variant of the "dirty-disk"
mode used to recreate a specific bcache bug and now we see stack traces
warning about unset OUTPUT_FSTAB in vmtest output:

  raise KeyError("missing environment vars: %s" % missing)

This branch applies the same fix to this scenario.

b022ed4... by Ryan Harper

curthooks: handle s390x/aarch64 kernel install hooks

On s390x, and aarch64, the kernel package directly calls
arch specific commands (zipl, flash-kernel) which fail to run
correctly if an initramfs isn't already created in the image. This
broke installation when we attempt to only create the initramfs
once. This branch adds arch support into the code path to divert
not only 'update-initramfs' but the arch specific tools as well and
restores them prior to running the real 'update-initramfs' command.

LP: #1856038

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