~raharper/curtin:fix/tox-flake8

Last commit made on 2019-01-24
Get this branch:
git clone -b fix/tox-flake8 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/tox-flake8
Repository:
lp:~raharper/curtin

Recent commits

8c0e898... by Ryan Harper

vmtest: flake8: use ==/!= to compare str, btes, and int literals

5b9e9be... by Ryan Harper

flake8: fix reference before assignment using common util FileMissingError

81bf02e... by Ryan Harper

clear-holders: handle FileNotFound when probing for bcache device slaves

In some cases, when detecting if a bcache has any slave devices which
need removal the path to the sysfs directory may not be found; this is
non-fatal; it indicates that the existing device has been removed by the
kernel. Allow clear-holders to tolerate this failure.

Updated curtin.block.partition_kname to indicate that bcache partitions
have 'p' in the value. This is needed for the vmtest to recreate bcache
partitions.

LP: #1811117

0e512c6... by Ryan Harper

vmtests: network mtu fix-by bump to post 19.04 release

Skip the TestNetworkMtuAbs test failures until post 19.04 release.

78d9c65... by Scott Moser

vmtest: Fix bug preventing explicit disabling of system_upgrade.

There was no way to avoid enabling system_upgrade, as the code would
simply do a truish test on the value of the environment variable, and:
   bool("false") == True.

When testing with a single proposed upgrade as in:
   CURTIN_VMTEST_ADD_REPOS=proposed
   CURTIN_VMTEST_UPGRADE_PACKAGES=open-iscsi

The normal behavior if CURTIN_VMTEST_ADD_REPOS has a value should be to
enable system_upgrade, but in this case we only want the single package
upgraded.

So now the environment can explicitly set that off with:
   CURTIN_VMTEST_SYSTEM_UPGRADE=false

834836b... by Ryan Harper

Release 18.2

Bump the version in curtin/__init__.py to be 18.2

22ad20d... by Scott Moser

Adjust helpers/common to edit GRUB_CMDLINE_LINUX_DEFAULT in place.

This will help us avoid hitting upgrade prompts as seen
and described in bug 564853. The change here is only to move
GRUB_CMDLINE_LINUX_DEFAULT to /etc/default/grub from
/etc/default/grub.d/50-curtin-settings.cfg.
Currently, other changes will still to into 50-curtin-settings.cfg.

Also collect /etc/default/grub files to artifacts and fix small issue
that resulted in the carryover args having an additional white space
at the end.

LP: #1527664

3f03b1d... by Ryan Harper

dname: persistent names based on serial or wwn

Currently /dev/disk/by-dname symlinks are not created
if a device does not have a partition table or a super block.
For devices which do have a serial or wwn number, curtin will
append an additional rule to the disk rules file which includes
both the partition table/superblock UUID as well as rule matching
the device provided serial or wwn. This ensures that even if
a block device is wiped that the dname will continue to function.

Other changes:
- add method to discover udev database value of a block device
  ID_SERIAL value.
- refactor nvme vmtests to use 'serial' values
- don't hardcode nvme serials based on their enumerated index
- ensure we pass nvme serials to both install and boot phases
- update disks_to_check for basic and nvme to ensure we have a
  dname for the disk itself

LP: #1735839

07245a2... by Scott Moser

Fix bug in is_swap_device if a device was smaller than page_size.

If is_swap_device was called on a device (or file) that was smaller than
a page size of the current kernel, then it would raise an OSError.
The change here just makes it check the size of the file before
attempting to read.

A test is added, and the other tests updated to rely less on mock.

LP: #1803672

253b97b... by Joshua Powers

vmtest: add disco tests