Older version of dpkg-parsechangelog in trusty does not seem to
support '--file=<file>' correctly. It does seem to support
--file <file> though. So we'll just use that format.
Writing to standard error from apply_net method would leak those
messages through to stderr when running tox. There was no value
in writing the messages as 'curtin' would still print them.
Also make apply_net consistent with other sub commands by changing
'apply_net_main' to let exceptions bubble up.
'curtin apply-net' will still write a message with the error
and will exit non-zero. If --showtrace is provided, it will
print the stack trace.
vmtest: Drop use of root-image.gz and maas2roottar.
The root-image.gz and its conversion into a root-tgz file are no
longer necessary. Dropping the legacy code has numerous benefits:
a.) no longer download root-image.gz files to local mirror
b.) do not uncompressing these.
c.) do not use maas2roottar which required sudo to create the root-tgz.
tools/curtainer: check that binary and source version are the same.
We saw a puzzling failure of vmtest against the daily archive.
The reason for failure was that the source package that was retrieved
via 'apt-get source' differed in version from the version installed.
This adds a check in curtainer that will exit failure if that is the case.
Enable simpler use of zfsroot by tagging the root filesystem format with
'zfsroot'. Curtin will then automatically construct zpool and zfs commands
to create a ZFS on Root setup. Some validation of the config included:
* only one 'zfsroot' type is allowed.
* zfsroot entry must be referenced by the / mount.
zfs: only load zfs on xenial+ skip artful/bionic zfs env export
The zfs module is only available on xenial+, so guard against modprobing it on
precise and trusty.
Xenial is the only release which curtin is exporting an environment variable to
aid grub to find zfs devices, therefor we should only check if the environment
has the exported value on xenial, skiptest otherwise.
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