curtin:master

Last commit made on 2018-12-06
Get this branch:
git clone -b master https://git.launchpad.net/curtin
Members of curtin developers can upload to this branch. Log in for directions.

Branch merges

Branch information

Name:
master
Repository:
lp:curtin

Recent commits

834836b... by Ryan Harper on 2018-12-06

Release 18.2

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

22ad20d... by Scott Moser on 2018-12-01

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 on 2018-11-29

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 on 2018-11-26

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 on 2018-11-15

vmtest: add disco tests

ee8a7df... by Scott Moser on 2018-11-16

unittest: change directory to tmpdir for testing relative files.

Previous commit 104331c3318 changed the behavior of the test
  test_relative_file_url
to test with an absolute path, when the point of the test was to
test relative.

The fix here does what was originally intended, testing that relative
file paths work and utilizing the tmp dir.

1ef6dfc... by Ryan Harper on 2018-11-16

Add clear-holders to meta-simple

Curtin's meta-simple which is used when deploying dd-images can
clear disks with a simple wipe but does not handle cases where
disks may be part of a layered stack like lvm, raid or bcache.
Allow meta-simple and meta-custom to use a common method for running
clear-holders to ensure devices used are free.

LP: #1786736

d0d9a26... by Ryan Harper on 2018-11-16

vmtests: check install log for Out of memory kernel messages and fail

During proposed testing, we observed in the Cosmic test which installed
the lxd snap, core snap and a linux kernel, 1G of ram was insufficient
and would trigger linux OOM and sometimes fail the install. Add a
test for the Out of memory string in our install log check and fail
vmtest installs if we find an OOM occurred during installation.

104331c... by Joshua Powers on 2018-11-15

unittest: correctly use tmpdir for my.img

This unittest was not correctly setting the path for creating
a temporary file. The result was an extra file, my.img, was created
each time a user ran tox.

LP: #1803611

ea939ee... by Ryan Harper on 2018-11-09

block_meta: use wipe config when clearing partitions

The partition handler in block_meta would wipe in "superblock" mode
before creating a partition but this only clears 1MB at the start
of the partition. Curtin needs to respect the wipe mode which may
wipe the location of the device differently.

Also:
  - Document pre-partitioning superblock wiping
  - Add PReP GPT config to basic/basic_scsi test
  - Sync basic and basic_scsi partition config
  - collect ls -al on /dev/disk/by-partuuid

LP: #1800153