~chad.smith/curtin:fix-autocollect-error-logs-makedirs

Last commit made on 2018-01-30
Get this branch:
git clone -b fix-autocollect-error-logs-makedirs https://git.launchpad.net/~chad.smith/curtin
Only Chad Smith can upload to this branch. If you are Chad Smith please log in for upload directions.

Branch merges

Branch information

Name:
fix-autocollect-error-logs-makedirs
Repository:
lp:~chad.smith/curtin

Recent commits

a9aad7a... by Chad Smith

use util.ensure_dir instead of a call to os.makedirs directly

e5ca7e7... by Chad Smith

call os.makedirs in create_log_tarfile if tarfile directory does not exist

dcc7fcc... by Chad Smith

error logs: automatically collect and tar curtin logs upon error.

If 'curtin install' errors, create a tarfile of curtin configuration, logs
and system info. This tarfile is simplifies triage and/or filing curtin
bugs. By default, the tarfile is written to
/var/log/curtin/curtin-error-logs.tar and can be configured by setting the
install:error_tarfile value.

This branch also:
  - uses deepcopy for CONFIG_BUILTIN to avoid manipulating a shared dict
    in unit tests
  - fixes a workingd variable declaration before raising errors to avoid
    undeclared variable errors

29fc9cf... by Scott Moser

vmtests: Support skipping skip_by_date tests based on environment.

Curtin's vmtest code has a function 'skip_by_date' which is used to
skip tests based until a certain date so developers can add a test
for a bug that is not yet fixed in another package. Each skip_by_date
call lists a bug by its bug number.

It serves to allow us to ignore known failures for a limited time but
remind us later to push to get fixes into other packages. The cost is
that someone has to "touch" code at a point in the future to bump the
skip_by_date values or remove them. That works well enough for trunk
where developers can easily make this change.

It causes issues though, in places where the code is not so easily
changed. An example is when we run tests on the version of ubuntu
in the archive. That packaged code is not so easily modified and
any skipby tests are basically time-bombs.

The solution here is to allow the runner of the test to specify
a comma separated list of bugs to skip in the environment variable
 CURTIN_VMTEST_SKIP_BY_DATE_BUGS
The special value '*' indicates all skip_by_date bugs should be skipped.

We expect to run tests on packaged code with this environment variable
set to '*'.

f4ac975... by Ryan Harper

Add zpool, zfs storage commands for experimental support of ZFS on root.

curtin/block
 - Add get_dev_disk_byid() to return a mapping of devname to disk/by-id
 - Add zfs and zpool to install deps dictionary

curtin/block/clear_holders
 - Add modprobe zfs

curtin/block/zfs
 - implement zpool_create, zfs_create, zfs_list, zfs_export and zfs_mount
   commands

curtin/dep
 - Add zfs, zfsutils-linux to ephemeral environment as needed
 - Introduce a check for required kernel modules (zfs)

curtin/commands/block_meta
 - implement handlers for type: zpool and zfs
 - add get_poolname resolver

curtin/commands/curthooks
 - On xenial, apt-mark hold zfs-dkms in target to prevent installation
   to work around bug 1742560.
 - Add an injection of a zfs environment variable required for ZFS on
   rootfs to work with grub; allows grub to extract the path to the zfs
   vdevs full path rather than just the devname (/dev/disk/by-id/foo vs
   disk/by-id/foo) to work around bug 1527727.

curtin/commands/install
 - Export ZPOOL_VDEV_NAME_PATH=1 into target environment to allow grub to
   work with zfs on root

doc/topics/storage.rst
 - Add documentation for zpool, zfs commands and experimental ZFS-on-Root

helpers/common
 - Update install_grub to skip block-device check if target is zfs.

tests/unittests/test_block
 - Add test for disk_byid methods

tests/unittests/test_block_zfs
 - Add coverage for block.zfs

tests/unittests/test_clear_holders
 - Update test to account for modprobe zfs

tests/vmtests/test_zfsroot
 - Add initial zfsroot install and test

029afa0... by Scott Moser

tests: revert workaround for bug in overlayroot that is now fixed.

This just removes a workaround that was put in place until bug 1733183
was fixed in maas images.

632e25e... by Scott Moser

tests: Bump skip_by_dates for bug 1652822 and 1671952.

Also here a usability improvement on skip_by_date that is demonstrated
in the shorter calls.

1cd451e... by Chad Smith

cli: add curtin collect-logs sub-command

The collect-logs command will create a named tarfile containing curtin
configured log_file and post_files as well as relevant system information
such as version, curtin-config, os-release, uname, lshw and network
information.

From source:
   ./bin/curtin collect-logs or
   python -m curtin.commands.main collect-logs
From package:
   curtin collect-logs

588c9d2... by Scott Moser

vmtest: Do not run tests of unsupported Ubuntu releases.

As somewhat expected attempts to install unsupported ubuntu releases
may fail. Example was today the Zesty tests would fail.
An 'apt-get update' would fail as the official mirrors have been
emptied of zesty already.

This uses ubuntu-distro-info (if installed) to skip unsupported
releases.

The user can provide a list of releases to skip with:
  UNSUPPORTED_UBUNTU="artful,zesty,trusty"
(comma or space separated).

855ab0c... by Scott Moser

Make license headers and file footers consistent and simplify.

There is no actual code change here. The changes are
a.) move LICENSE file to LICENSE-AGPLv3
b.) put short form of AGPL-v3 license in LICENSE file,
    and mention Copyright info there.
c.) remove license headers in python or shell files.
d.) put a single line header in all python or shell files.
e.) put a single footer line in all python or shell files.

There is a change here from "AGPLv3 or later" to just "AGPLv3".