~raharper/curtin:fix/lp1785356-switch-to-uuid4

Last commit made on 2018-08-06
Get this branch:
git clone -b fix/lp1785356-switch-to-uuid4 https://git.launchpad.net/~raharper/curtin
Only Ryan Harper can upload to this branch. If you are Ryan Harper please log in for upload directions.

Branch merges

Branch information

Name:
fix/lp1785356-switch-to-uuid4
Repository:
lp:~raharper/curtin

Recent commits

005d919... by Ryan Harper

xkvm: add virtio-based rng devices reading from /dev/urandom

331a3f3... by Ryan Harper

block: use uuid4 (random) when autogenerating UUIDS for filesystems

The use of uuid1 (timebased) results in UUID values that are visually
hard to distingish. Instead use UUID4 which generates a random
UUID value which results in more varied UUID values that end up in
/etc/fstab.

LP: #1785356

5b60f09... by Ryan Harper

clear-holders: reread ptable after wiping disks with partitions

When wiping a disk with partitions curtin races the kernel in removing
sysfs entries for the partitions. This shows up as a OSError when
asserting the disk is clear as partition sysfs paths are unexpectedly gone
during the building of the holder tree.

To prevent the race, wipe_superblock will check if the device has
partitions and if so after wiping the the superblock, rescan the
device partition table and then check that the device no longer has
partitions, possibly sleeping and rescanning.

03587d3... by Scott Moser

vmtest: Skip proposed pocket on dev release when 'proposed' in ADD_REPOS.

The -proposed pocket for an Ubuntu development release is somewhat
expected to be broken. So, when testing proposed with via setting
CURTIN_VMTEST_ADD_REPOS=proposed, this will skip adding the repo for
the development release.

It allows testing of development release with:
  CURTIN_VMTEST_ADD_REPOS=PROPOSED

32b1c6f... by Joshua Powers

tests: remove Ubuntu Artful

Ubuntu Artful has reached EOL and as such this removes the Artful tests.

74552f7... by Scott Moser

vmtests: Let a raised SkipTest go through skip_by_date.

There was a general logic error in skip_by_date. If a setUpClass
raised a SkipTest and the fix-by date had not been raised then
we would swallow that SkipTest. Th result was that the test methods
would fail as the install had not been done.

We saw this specifically at the end of Artful's support. The
artful setUpClass would then raise SkipTest due to
'is_unsupported_ubuntu'. skip_by_date was swallowing that.

The change here is to just let a SkipTest bubble through the
skip_by_date wrapper.

302c61b... by Scott Moser

vmtests: Increase root fs to give upgrades to -proposed more space.

Our new jenkins job curtin-vmtest-devel-amd64-proposed runs with
CURTIN_VMTEST_ADD_REPOS=proposed . That causes an
'apt-get update && apt-get dist-upgrade' to occur in the installed
system.

The change here simply increases by 500M the size of the root
disk tests that use examples/tests/mirrorboot-msdos-partition.yaml.
We can simply do this because the md0-part1 was on md0 which was a
5G disk, but we were creating 2x2G partitions. So now we still have
some wiggle room there.

This particular build failed because of 2 reasons
a.) the HWE variety meant additional kernels installed
b.) the trusty images are well out of date at thsi point (2018-05-02)
so lots of apt downloads and upgrades.

80a453f... by Scott Moser

vmtest: Order the vmtest_pollinate late_command earlier.

The TestInstallUnmount verifies that 'install: {umount: disabled}' does
leave filesystems mounted, but its late_commands were unmounting
the target. Those conflicted with the late_commands here as we
expected the fs to be mounted.

Fix here is just to move the un-mounting late commands till '99' time
frame and move the vmtest_pollinate one earlier.

71b43e7... by Scott Moser

vmtest: always add 'curtin/vmtest' to installed pollinate user_agent.

In order to easily filter out vmtest runs and also count them,
we add 'curtin/vmtest' to the pollinate user agent if that directory
has been created.

81d2d9f... by Scott Moser

vmtests: make skip_by_date a decorator that runs and reports.

Previously when we marked something 'skip_by_date', it would not
run until the 'fixby' date. At that point one of 2 things would happen:
 a.) it fails and we have to bump the date out.
 b.) it passes, and then at the 'remove_by' we see the error and respond
     with removal.

'b' works as designed, but there was a problem with 'a' in that we are
basically blind about these tests until fixby.

The change here is to turn skip_by_date into a decorator that will
run the tests, but raise SkipTest until fixby. At that point, then
it will behave as before.

skip_by_date can be given 'install=False' which means the setUpClass
will raise a skipTest. This is used if the test install or boot will
hang, simply to avoid long timeouts in our tests as a result of known
failures.

The additional benefit of the generator here is that adding and
removing skip_by_date is entirely a one line change. No additional
imports, no adding a subclass definition and calling super().