~smoser/curtin:feature/zfsroot-as-fstype

Last commit made on 2018-01-29
Get this branch:
git clone -b feature/zfsroot-as-fstype 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:
feature/zfsroot-as-fstype
Repository:
lp:~smoser/curtin

Recent commits

eca3444... by Scott Moser

change /ROOT/ubuntu to be /ROOT/zfsroot

'ubuntu' seems not really right here.

223dd74... by Scott Moser

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.

2535c22... by Ryan Harper

Add zfsroot as a filesystem type

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.

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

a4c9636... by Scott Moser

tests: cleanup the apt custom sources test.

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.