lp:~smoser/curtin/trunk.install-kernel-fix

Created by Scott Moser and last modified
Get this branch:
bzr branch lp:~smoser/curtin/trunk.install-kernel-fix
Only Scott Moser can upload to this branch. If you are Scott Moser please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Scott Moser
Project:
curtin
Status:
Development

Recent revisions

328. By Scott Moser

fix logic error in kernel installation

If a kernel package was available but not installed
the code would use the fallback path, rather than installing it.

This fixes the logic error and uses 'has_pkg_available'.

327. By Scott Moser

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

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
directly.

325. By Scott Moser

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

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.

323. By Scott Moser

fix python executable selection when 'curtin --help' is called

The launcher was passing command arguments through to PY3OR2_MCHECK. If
you ran './curtin --help', then the launcher would call:
  python3 -m $PY3OR2_MCHECK --help
That program would print its help, and exit 0. The launcher would
interpret the exit status of 0 to mean all dependencies were met. If that
was not the case, then it would not look further to test python.

In an environment (trusty) where python2 had deps installed, but python3
did not, the launcher would then invoke 'curtin --help' with python3.
That would then stacktrace on missing dependencies.

The fix here is to pass '--' to separate the arguments to the checker
from the arguments that would be used.

In order to facilitate debugging, if PY3OR2_DEBUG is present, then
we will add '-v' to the invocation, calling:
  python3 -m $PY3OR2_MCHECK -v -- args...

The result is then that:
  PY3OR2_DEBUG=1 ./bin/curtin --help

Will show output like:
  python3 [94]: Fix with:
    apt-get -qy install lvm2 mdadm python3-oauthlib xfsprogs
  current best: python3
  python [94]: Fix with:
    apt-get -qy install lvm2 mdadm python-oauthlib xfsprogs
  executing: python3 -m "curtin.commands.main" --help

322. By Scott Moser

subp: add decode parameter, defaulting to replace

previously stdout and stderr of a process called by subp would have
decode('utf-8') called on it. If that raised a UnicodeDecodeError
then it would be passed up.

Some programs used by curtin may at times output such binary data.
The example that triggered this was unexpectd binary data in lsblock
output.

Now, the caller can call subp with the decoding that they want.
Default is decode=replace. If decode=False, no decode is done. To get the
old behavior, the user needs to pass 'decode=strict'

321. By Scott Moser

support passing an integer or valid float to human2bytes

We were forcing people to pass 'size' in a config as a string.
human2bytes("100") was fine but human2bytes(100) would raise exception.

Seems to make sense for human2bytes to allow int (100) or float (100.0).
floats are allowed if int(size) == size (100.0 is ok, 100.4 is not).

320. By Ryan Harper

Use /proc/mounts to find missing mountpoints

lsblk (notably on trusty) does not find all mountpoints. Augment
block.get_mountpoints() lsblk data with mountpoints from proc/mounts.
Refactor reading proc/mounts into common function in block for reuse.

Fixes PreciseTestBasic (issues with btrfs on whole disk)
Fixes TrustyTestBasic (issues with dname and ptable)

319. By Scott Moser

tests: invoke nosetests with --nologcapture

When a install or boot fails, the vmtest harness would log.DEBUG
with the console log output. nose was capturing this logging
and replaying it on test failure.

This causes very long output to the screen of the user who ran
'make vmtest', making it hard for them to find out what happened.

Since we're now reasonably storing the console logs, its quite
sane to not spit those to stderr so that the output is easier to read.

Branch metadata

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

Subscribers