move zfsroot changes into 'apply_zfsroot_changes' method.
Instead handling all the 'zfsroot' entries as part of the format_hanlder,
adjust the config at the beginning before anything is processed.
It inserts the pool, container and zfs entries at the location of
the 'zfsroot' entry and removes the 'fstype' and 'mount' entries.
This enables the of the code able to handle the "full zfs" format without
any changes, and localizes the 'zfsroot' changes to a single method and
method call.
Re-working this also enables unit test more easily, and one is added.
Also, add some exception handling / checking of the config.
* only one 'zfsroot' type is allowed.
* zfsroot entry must be referenced by the / mount.
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.
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
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
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).
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".
This test must have gone through some iteration in development.
It was testing in a very white-box way, and not really even validating
that the config was as expected (as made evident by the previous
lack of use of EXPECTED_CONVERTED_CONTENT).
The test now asserts that the two expected changes are made.