curthooks: always use ChrootableTarget.subp when calling efibootmgr
There was a bug recently introduced when adding the feature to remove
duplicate UEFI boot entries which removed use of ChrootableTarget
subp method. The assumption was that util.subp calls would also get
the target parameter set but this was not the case. The ephemeral
environment does not usually have efibootmgr package installed but
we ensure that it is present in the target system. This branch
replaces calls to util.subp with the ChrootableTarget subp method.
NVME "multipath" devices are a virtual subsystem inside the kernel
that has nothing to do with traditional multipath. The kernel nvme
driver jumps through hoops to hide a controller node and pretend that
it is a block device when it is emphatically _not_. It's not suprising
that this breaks lots of things.
These phony block devices do present a virtual NVME block device and
curtin block-discover ignores composed virtual devices when
constructing storage-config 'type: disk' devices. We must include such
devices as 'type: disk'.
This patch narrows our filter to exclude any DEVPATH which is
/devices/virtual/block and NVME mp devices use
/devices/virtual/nvme-subsystem.
DASD devices have a 'vtoc' partition table type. When we're handling
a disk config with 'preserve': True we raised a ValueError expecting
either 'gpt' or 'msdos'. Fix this by refactoring the code to check
the expected ptable value and adding a check_vtoc_signature method.
The new py3-pyflakes environment tests the code against a specific
version of pyflakes, and it is run by default. This in contrast
with the existing tip-pyflakes environment, which tests against the
latest pyflakes version and it is not part of the default tox run.
storage_config: Add 'extra_options' parameter to allow custom mkfs
Allow users to provide additional flags to the mkfs command used to
create a filesystem during storage configuration. The extra_options
value is a string that will be appended to the constructed mkfs
command. The value will be split on whitespace to show up as
individual arguments to the mkfs command.
Update detection methods for Ubuntu Core 20. Use new agreed upon location
for writing out cloud.cfg.d directory with contents provided from MAAS.
Add vmtest coverage for UC20 image as well.
Newer tox on focal is not happy when inhieriting dependencies.
First in py27 testenv, it does not pickup the 'testenv' deps
which includes test-depedndences and dependencies files. Fix
this by explicitly referencing these deps fir testenv:py27.
Second, in testenv:trusty-p27, which recreates specific package
versions to model the trusty build environment we cannot pull in
the default testenv deps, as this breaks with different versions
of mock and other settings. Instead, just bring in the setuptools
dep to ensure we can keep running on py27 for now.