~smoser/curtin:master

Last commit made on 2018-11-17
Get this branch:
git clone -b master 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:
master
Repository:
lp:~smoser/curtin

Recent commits

253b97b... by Joshua Powers

vmtest: add disco tests

ee8a7df... by Scott Moser

unittest: change directory to tmpdir for testing relative files.

Previous commit 104331c3318 changed the behavior of the test
  test_relative_file_url
to test with an absolute path, when the point of the test was to
test relative.

The fix here does what was originally intended, testing that relative
file paths work and utilizing the tmp dir.

1ef6dfc... by Ryan Harper

Add clear-holders to meta-simple

Curtin's meta-simple which is used when deploying dd-images can
clear disks with a simple wipe but does not handle cases where
disks may be part of a layered stack like lvm, raid or bcache.
Allow meta-simple and meta-custom to use a common method for running
clear-holders to ensure devices used are free.

LP: #1786736

d0d9a26... by Ryan Harper

vmtests: check install log for Out of memory kernel messages and fail

During proposed testing, we observed in the Cosmic test which installed
the lxd snap, core snap and a linux kernel, 1G of ram was insufficient
and would trigger linux OOM and sometimes fail the install. Add a
test for the Out of memory string in our install log check and fail
vmtest installs if we find an OOM occurred during installation.

104331c... by Joshua Powers

unittest: correctly use tmpdir for my.img

This unittest was not correctly setting the path for creating
a temporary file. The result was an extra file, my.img, was created
each time a user ran tox.

LP: #1803611

ea939ee... by Ryan Harper

block_meta: use wipe config when clearing partitions

The partition handler in block_meta would wipe in "superblock" mode
before creating a partition but this only clears 1MB at the start
of the partition. Curtin needs to respect the wipe mode which may
wipe the location of the device differently.

Also:
  - Document pre-partitioning superblock wiping
  - Add PReP GPT config to basic/basic_scsi test
  - Sync basic and basic_scsi partition config
  - collect ls -al on /dev/disk/by-partuuid

LP: #1800153

b69e35e... by Chad Smith

tests: fix vmtests for apt perserve_source_list changes

Commit 40e6cc3 changed behavior for curtin to emit only the new format apt
config "apt: preserve_sources_list" instead of the old format
"apt_preserve_sources_list". Vmtests needed updating on Xenial and later
to check only for the new format.

40e6cc3... by Scott Moser

apt: Use new format apt config when writing preserve_sources_list.

cloud-init reads the "preserve_sources_list" setting from 2 config paths:
 old: top level apt_preserve_sources_list
 new: apt/preserve_sources_list

Previously curtin would write only the old form. That lead to the
case where cloud-init would raise exception complaining about conflicting
settings and exiting error. That occurred because MAAS was incorrectly
sending 'preserve_sources_list: True'

The change here could result in actually causing that problem if:
A. a user was specifying old style 'apt_preserve_sources_list=False' in
   user-data. They now have to match the version that curtin writes
   but at least curtin is writing new format on new cloud-init.
B. MAAS provided differing setting in the curtin config
  'debconf_selections'

That is because now the system will have format config specifying True
written by curtin and a different format written by user/maas.

I'd suggest the most likely chance for regression here would be
16.04+ systems with old MAAS (providing 'B') or JuJu providing 'A'.

LP: #1735950

01e9fc5... by Ryan Harper

vmtests: multipath mount /home with nofail and validate in unittest

In some scenarios the mounting of /home partition under multipath fails
and leaves the boot stage hung in emergency shell. We have no ability
to debug this in automated runs on infrastructure. Instead we will now
pass the 'nofail' mount option which instructs systemd to not fall to
the emergency shell allowing the boot to complete and vmtest to collect
information. We now validate the status of the home mount in the
unittest in the class. When this fails, we will have collected the
journal and the unit information which should help narrow down why
we see the failure.

182a58b... by Scott Moser

vmtests: fix common collect scripts to not exit failure.

If collect scripts exit non-zero, then cloud-init in the booted system
will complain that they have done so. This adds noise to logs.

At this point, the only command in a long list that affects the exit code
is the last one. At some point in the future we may have more systematic
collection. At that point it might make sense to exit if the collection
failed.

For now, just exit 0.