~raharper/curtin:fix/vmtest-unpack-collect-errors

Last commit made on 2018-10-17
Get this branch:
git clone -b fix/vmtest-unpack-collect-errors 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-unpack-collect-errors
Repository:
lp:~raharper/curtin

Recent commits

04cbc65... by Ryan Harper

vmtest: handle collect disk unpack failure

If unpacking a collect disk fails, we don't chmod the collect
disk output which can leave un-removable files for non-root users.
Fix this by catching the CalledProcessException and adding a
finally clause to run the recursive chmod.

1ad639b... by Ryan Harper

vmtests: dont use multiple subclasses in uefi 4k tests

The uefi 4k sector size test used an intermediary subclass
to set the sector_size of 4k, but the resulting subclass
ended up creating an instance of the parent class which set
the 'collect_scripts' attribute and then tripped the runtime
check on vmtests having an empty 'collect_scripts' attribute.

The fix was to create the 4k tests directly from the base class.

e4727e8... by Ryan Harper

vmtests: disable snapd/seeding to avoid boot hang

In Cosmic some snaps are now seeded in the image and will
automatically install/mount at runtime. Overlayroot has
exposed a bug in snapd but prevents images from booting
completely. Workaround this issue (bug #1797218)
snapd and snapd.seeded services. A nice side-effect is that
those images with seeded snaps boot faster and use less
memory.

94afac7... by Ryan Harper

jenkins-runner: fix when using --filter only

The elif clause when checking for tests via positional or filter
parameters never took the path where we invoked vmtest-filter.
Fix this by only pre-populating tests with 'tests/vmtests' if
there are no positional parameters and no filter parameters.

Also re-indent filter block to match program style.

0f99308... by Ryan Harper

distro: fix system_upgrade command using string instead of function

The distro system_upgrade configuration dictionary used a string
for the name of the function to call which resulted in attempting
to call a string type which failed. This was found in CI running
proposed upgrade testing.

The fix is to use the function name itself rather than string.
This branch also adds unittest for invoking the system_upgrade path.

LP: #1796968

f4bf707... by Ryan Harper

Capture stdout when using lxc file push

Newer lxd (3.4+) 'file' command now produces progress info in some
cases written to stdout. This breaks curtin-from-container which
is invoked with the 'pack' curtin command which also writes to stdout.
The result was a corrupt curtin package output file which left all
vmtests sitting idle in the ephemeral boot phase and timing out.

To resolve, we capture stdout from lxc file push and report
the contents if file push fails.

14210d5... by Scott Moser

vmtest: boot ephemeral with 'ro' on the kernel command line.

As raised in bug 1792905, when 'ro' is present in on the kernel command
line and the squashfs (rooturl=) parameter does not have a /lib/modules
then copymods fails to copy the modules into the "real root" and
things fail.

Maas is booting with 'ro', so it makes sense for curtin to do the same.
Additionally, 'ro' is present in almost all cases on a command line.

3aafe77... by Scott Moser

vmtest: Fix typo in skip-by-date.

The previous commit made one skip by date change go backwards.
Instead of 2019 we had set it to 2018.

0a27f28... by Scott Moser

vmtest: kick skip-by-date for 1671951.

The bug is marked as fix-released (cosmic), and not fixed in bionic.
Our tests still fail in cosmic though, so kick this along while we figure
that out.

1149317... by Scott Moser

tools/jenkins-runner: Error if both filters and tests are given.

Previously if you gave both '--filter' and 'tests/vmtests/' arguments
to tools/jenkins-runner it would just silently ignore the test arguments.
Just fail instead of doing the wrong thing, and possibly leaving the user
believing that the tests they provided correctly ran.