Consider disks and partitions when checking for holders that
need removal before they can be used. Additionally when shutting
down a raid, if it is inactive or broken, writes to the /dev/mdX
device will fail which is expected, don't exit instead, log a
non-fatal error and continue with shutting down the raid.
With these fixes TestReuseRAIDMemberPartition vmtests now pass.
install: export zpools if present in the storage-config
Curtin needs to run zpool export on the any pool it created
before booting as zfs-initramfs 0.8 now requires a pool to
be exported before being imported.
the second jenkins-runner will have to wait for the first one to
finish, as it's locked by vmtest-sync-images. A full vmtest run
can take several hours. I easily spotted successful runs that
took more than 16 hours on our Jenkins log. Setting the default
timeout to something like 20 hours should be safe, but I still
don't think it's a good default, as it is too high for all the
cases where only a subset of the tests is being run. The timeout
is too dependent on the hardware, on how busy the server is,
and on the set of tests which is run. No size fits all.
Other minor changes:
- Force CURTIN_VMTEST_IMAGE_LOCK_TIMEOUT to be an integer
- Remove unnecessary quotes around fixed strings
This change implements a file locking mechanism in the
jenkins-runner and vmtest-sync-images scripts.
The vmtest-sync-images script requires two exclusive locks
to start updating the images: a lock on IMAGE_DIR and a
lock on a lockfile. The script will wait to get both locks
locks before actually updating the images.
The jenkins-runner script does the following:
(1) set a shared lock on IMAGE_DIR
(2) set a shared lock on the lockfile
(3) release the lock on IMAGE_DIR
(4) run the vmtests
(5) exit (releasing the lock on the lockfile)
The jenkins-runner does not hold a lock on IMAGE_DIR while
running, allowing vmtest-sync-images to set a lock there,
prevending further jenkins-runners from running the vmtests
while the images are being updated. In other words
vmtest-sync-images can "book" the images for the next
available slot.
Steps (1) and (3) can be skipped by passing the
--skip-images-dirlock option to jenkins-runner. In this way
jenkins-runner has precedence over vmtest-sync-images. This
is useful when it should run ASAP, for example in CI runs.
Make the vmtests/test_basic test suite run on ppc64el
Changes:
- On ppc64el inject a PReP partition to the storage configuration
- Expect a GPT partition table and not a DOS one on ppc64el
- Skip XenialGAi386TestBasic if target_arch != amd64
- Skip XenialGAi386TestZfsRoot if target_arch != amd64
- Skip XenialGAi386TestZfsRootFsType if target_arch != amd64
- Skip test_partition_is_zero on ppc64el (LP: #1843288)
- Skip all the CentOS tests if target_arch = ppc64el