~smoser/curtin:fix/jenkins-runner-filter-test-incompat

Last commit made on 2018-09-21
Get this branch:
git clone -b fix/jenkins-runner-filter-test-incompat 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/jenkins-runner-filter-test-incompat
Repository:
lp:~smoser/curtin

Recent commits

e400cbf... 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.

5f0082d... by Ryan Harper

Enable custom storage configuration for centos images

Add support for the majority of storage configurations including
partitioning, lvm, raid, iscsi and combinations of these. Some
storage configs are unsupported at this time:
 Unsupported storage config options on Centos:
  - bcache (no kernel support)
  - zfs (no kernel support)
  - jfs, ntfs, reiserfs (no kernel, userspace support)

Curtin's built-in curthooks now support Centos in addition
to Ubuntu. The built-in curthooks are now callable by
in-image curthooks. This feature is announced by the
presence of the feature flag, 'CENTOS_CURTHOOK_SUPPORT'

Other notable features added:
 - tools/jenkins-runner now includes a test filtering
   ability which enables generating the list of tests to
   run by specifying attributes of the classes. For example
   to run all centos70 tests append:
   --filter=target_release=centos70
 - curtin/distro.py includes distro specific methods, such as
   package install and distro version detection
 - util.target_path has now moved to curtin.paths module

b812ae8... by Ryan Harper

vmtest: ensure we collect /var/log/journal only once

Appending the journal script to the collect_scripts parameter
modified a share class variable which resulted in more than
one call to the script to collect the journal. The script itself
was not defensive about repeated calls and would copy the
journal dir more than once which resulted in filling the capacity
of the output disk.

The changes here make the script defensive to only run once,
and fail if additional attempts to run are made.

2d9b2c6... by Ryan Harper

Don't allow reads of /proc and modprobe zfs through

New zfs_supported check reads /proc/filesystems to see if
zfs is already available and attempts to modprobe. These things
fail under launchpad sbuilds. Make sure to mock out the calls to
these functions and provide positive values for the failing unittest.

72b02c2... by Ryan Harper

clear-holders: handle missing zpool/zfs tools when wiping

Allow curtin to continue to wipe disks on systems where zfs
kernel module is present but zfsutils-linux is not.

LP: #1782744

6a776e1... by Ryan Harper

clear-holders: rescan for lvm devices after assembling raid arrays

Lvm devices to be found after assembling raid arrays. Add a call after
lvm_scan to activate any discovered vgs and lvs.

LP: #1783413

40d682c... by Ryan Harper

vmtest: enable persistent journal and collect at boot time

Target OSes which use systemd-journald may or maynot enable a
persistent journal on the root filesystem. If the target release
supports journald, issue the commands to create a persistent
journal. During the boot phase, issue commands to flush the
journal and collect (and compress) the journal as the last
script before tar'ing the collect data.

Rename vmtest_pollinate.yaml to vmtest_defaults.yaml. This
file is included in all vmtest runs.

1b387fb... by Scott Moser

Add timing and logging functions.

This adds some decorators and functions to easily time function call.
It was originally done to get an idea on how much time we spend waiting
for udevadm settle, but the code is generally useful.

Note that the 'cmd_install' timer unfortunately doesn't make it
into the saved-off log as the message is appended after it is copied.

1a201e5... by Scott Moser

parse_dpkg_version: support non-numeric in version string.

This fixes parse_dpkg_version for packages with non-numeric (0-9.)
in their versions. It also improves it to work for native packages.
Native packages do not have '-'. Also adds tests of parse_dpkg_version.

LP: #1786795

2b12b8f... by Scott Moser

Add main so that 'python3 -m curtin' does the right thing.

We could (and did) call curtin as 'PYTHON -m curtin.commands.main'.
That is just overly commplicated. This makes it work as
 PYTHON -m curtin