zfsroot: add additional checks, do not require disk 'serial' attribute
Add some additional validation to the storage config when using 'zfsroot'
format type. Ensure that the bootdisk is formated with GPT. Allow a
storage config using zfsroot/zpool to work with disks without a 'serial'
attribute, but log a warning that the pool may be unstable due to changes
in device names. Add unittests and update documentation with restrictions.
clear-holders: fix lvm name use when shutting down
The shutdown_lvm handler was reconstructing the name of
the lvm device incorrectly if the vg or lv name included
a hyphen. LVM requires names with hyphens to duplicate the hyphen.
Resolve this issue by keeping the original name from the sysfs
entry and using that when issuing the dmsetup command.
install: prevent unmount: disabled from swallowing installation failures
Using a 'return' or 'break' command in a finally block will discard
any saved exception. The return also removed a code path preventing
the install stage from applying any power state. Fix by converting to
an if/else. https://docs.python.org/3/reference/compound_stmts.html#try
pycodestyle: Fix invalid escape sequences in string literals.
A bit of information from python doc that I got by never having known:
String literals may optionally be prefixed with a letter `r' or `R';
such strings are called raw strings and use different rules for
backslash escape sequences.
...
Unless an `r' or `R' prefix is present, escape sequences in strings are
interpreted according to rules similar to those used by Standard C.
So basically, any use of \ not followed by one of [\'"abfnrtv]
or \ooo (octal) \xhh (hex) or a newline is invalid. This is most
commonly seen for us in regex. To solve, you either:
a.) use a raw string r'...'
b.) correctly escape the \ that was not intended to be interpreted.
Drop ubuntu branch management script new-upstream-snapshot.
This script was used for managing our ubuntu/ branches.
Instead of maintaining it here, we have moved it to another location. https://github.com/cloud-init/qa-scripts/