~smoser/curtin:fix/common-script-exits-non-zero

Last commit made on 2018-10-17
Get this branch:
git clone -b fix/common-script-exits-non-zero 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:
fix/common-script-exits-non-zero
Repository:
lp:~smoser/curtin

Recent commits

de19516... by Scott Moser

Fix typo- thanks rharper.

e27e2fc... by Scott Moser

Also remove += in extra_collect_scripts usage.

2efbde5... 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.

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.