lp:~wesley-wiedenmeier/curtin/error-output

Created by Wesley Wiedenmeier and last modified
Get this branch:
bzr branch lp:~wesley-wiedenmeier/curtin/error-output
Only Wesley Wiedenmeier can upload to this branch. If you are Wesley Wiedenmeier please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Wesley Wiedenmeier
Project:
curtin
Status:
Development

Recent revisions

330. By Wesley Wiedenmeier

Ensure that byte input to ProcessExecutionError is converted to str

329. By Wesley Wiedenmeier

Improved formatting for util.ProcessExecutionError

 - Display stdout and stderr for ProcessExecutionError formatted with newlines
 - Indent output of stdout and stderr to same level as first line, makes it
   easy to read multiline error messages and tell where they stop

328. By Scott Moser

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

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

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.