curthooks: do not add lvm devices filter when / is mutipathed
This code was added to defend against lvcreate seeing multiple paths to
a PV but the relevant udev rules already protect against this, and the
devices filter prevents assembling a VG containing an encrypted volume.
The commmit "disk_handler: check wipe field when deciding whether to
reformat raids" fixed the case of putting a partition on an existing
raid but broke the case of putting a partition on a new RAID.
fix tearing down ChrootableTarget when mounts appear while it is set up
There are several bug reports that boil down to
ChrootableTarget.__exit__ failing to unmount bind mounts with "target is
busy". For example, ssh-ing in while running tends to do this, because
that creates a mount in /run and then umounting /target/run fails
because of the sub mount. Fix this by marking the mountpoints
recursively private and then unmounting them recursively.
disk_handler: check wipe field when deciding whether to reformat raids
Currently preserve=true for raid means "preserve the RAID array"
and ALSO "preserve the partition table". So change the
interpretation of preserve to be solely about preserving the
array and instead check the wipe field to decide if the array
should get a new partition table or not.
pylintrc: explicitly list the DISTROS generated-members
For some obscure reason setting
generated-members=DISTROS\.
in pylintrc makes the pylint run flaky, causing failures like:
curtin/commands/install_grub.py:93:19:
E1101: Instance of 'Distros' has no 'debian' member (no-member)
curtin/commands/install_grub.py:155:28:
E1101: Instance of 'Distros' has no 'redhat' member (no-member)
These failures:
- happen on about 15% of the time, at least on Bionic
- also happen with the latest stable version of pylint (2.8.2)
- only happen on install_grub.py (which only refers to debian and redhat)
- do not seem to happen on Impish.
- possibly related: https://github.com/PyCQA/pylint/issues/1628
But the truth is I don't understand why generated-members=DISTROS\.
even works some of the time for some generated members. Let's replace
it with the explicit list of the (non auto-detected) generated members,
so it will always work, and we'll know why it does.