Created by Robert Clark on 2016-01-05 and last modified on 2016-01-25
Get this branch:
bzr branch lp:~returntoreptar/curtin/removable-drive-fixes
Only Robert Clark can upload to this branch. If you are Robert Clark please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Robert Clark

Recent revisions

333. By Robert Clark on 2016-01-05

In http://bazaar.launchpad.net/~curtin-dev/curtin/trunk/revision/202 the devices which curtin will attempt to install on was limited to only devices which are not marked as removable by lsblk. Unfortunately lsblk reports some drives as removable which in reality are the main drives in the server.

In order to still favor non-removable drives but still allow removable drives as a last resort, this commit performs a check after searching for installable and non-removable devices if any were found. If none were found we then search for installable and removable devices which can be installed on. If we still find no devices, an exception is thrown. This exception throws a cleaner error message than the previous error received by users encountering this case, which was a cryptic "list index out of range" error.

332. By Scott Moser on 2016-01-05

fix bug in install_grub to partition when storage_config provided.

when installing with a storage config and grub is to be installed
on a partition (as it is in powerpc) we were not able to look
up the device that was to be installed on.

This puts a temporary bit of code in place that finds that device
via imports from commands.block_meta. The result is that
storage_config now works for lvm on power8 systems.

331. By Scott Moser on 2016-01-04

url_helper: raise import error on lack of oauth only when oauth is used

Previously url_helper.py would raise exception if no oauth module
was present. That is definitely reasonable.

However, in the jenkins 'vmtest' test environment there was no oauth
available. Everything else would have been fine, and only
'curtin pack' is executed from the host. It feels like curtin pack
is sane to want to run with minimal dependencies.

I do definitely want to be careful with the dynamic manner here.
However, outside of MAAS reporter using oauth, it really is a unlikely
path to be hit. And MAAS's use case is still satisfied because
--install-deps is provided.

330. By Scott Moser on 2016-01-04

block_meta: handle 'preserve' flag for raid devices

The raid handler did not respect the 'preserve' flag and
attempted to recreate the raid device instead of verifying it.

Migrate mdadm usage into curtin.block.mdadm module.
Complete mdadm unittest for new module.

329. By Scott Moser on 2016-01-04

close file descriptors from --config= arguments

when running lvm installs, lvm over-zealously says things like:
   File descriptor 3 (configs/config-000.cfg) leaked ...

This is described for grub at 1313784 and a workaround there too.

The one listed here actually *is* a leaked file descriptor though.
Those are opened. After consuming we should close.

328. By Scott Moser on 2015-12-18

xenial: disable update-motd during an apt-get update

as reported in bug 1527710, xenial is starting a background task after
'apt-get update' is run. That was causing our unmount of the target
to fail and fail the installation.

The fix here is to disable the execution of that file and then restore
it if we did so.

327. By Scott Moser on 2015-12-18

re-work some of the test framework for less copying.

here we do the following cleanup:
 a.) re-order some of the tests in a file, so that
     for a given test, we do in release order (Precice, Trusty, Vivid..)
     this is purely cosmetic and not enforced by anything.
 b.) add releases.py and use it to define the
     what was being defined in each test case. That removes duplication
     of 'arch', 'repo', and 'release'
 c.) generally clean up duplication that was present
 d.) use __test__ = False for any class that is a subclass of TestCase
     that should not be tested. That makes nosetests skip it.

326. By Scott Moser on 2015-12-18

vmtest: add users ssh keys to guest system, make bridge configurable

This change makes it easier to get into a system that has launched. Any
ssh keys the user has in the normal .ssh/<name>.pub locations and any that
are available in an ssh agent are added to the authorized_keys in both the
install system and the installed system.

the additional change allows the user to put guests on a bridge other than
qemu user mode networking. by setting CURTIN_VMTEST_BRIDGE=lxcbr0, the
guests will be launched on lxcbr0 and will be able to ssh into them

325. By Scott Moser on 2015-12-17

Enable the first xenial tests

There is a FIXME marking the fact that at the moment we have
specific kernel args that we have to pass for xenial.

Also here are a couple of class-order-in-file changes I couldn't resist.
They put Vivid tests before Wily just to have sane order.

324. By Scott Moser on 2015-12-17

curthooks: know kernel mapping for xenial (4.4.0)

The KERNEL_MAPPING needs to be kept up to date for lts enablement kernel
versions. This just adds xenial as 4.4.0.

This is only relevant for mapping kernel major.minor to -lts-<releasename>.

On xenial, current is 4.3.0 kernel, but 4.4.0 is expected to ship.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
This branch contains Public information 
Everyone can see this information.