lp:~smoser/curtin/trunk.lp1604962

Created by Scott Moser and last modified
Get this branch:
bzr branch lp:~smoser/curtin/trunk.lp1604962
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

427. By Scott Moser

adding code i was playing with.

The intent of this would be for curtin to do something like the main
here. Instead of invoking the shell reboot function, it would
search for a parent that it liked (such as one named cloud-init).
If there was no good looking parent, then it would use itself.

So basically:
 - select a process P to wait until it is gone.
 - fork
 - exit from main process
 - second process polls for process P to have left the building
 - second process (conditionally) invokes the reboot.

426. By Ryan Harper

bytes2human: fix for values larger than 32 bit int on 32 bit python2.

This fixes a bug in bytes2human when running on 32 bit system.
the bytes2human tests would fail because we were not testing for a
type 'long' and integers over 32 bit get converted to long.

    $ uname -m
    i386
    $ python2 -c 'print(type(1024 ** 3 * 10))'
    <type 'long'>

425. By Ryan Harper

unittest,tox.ini: catch and fix issue with trusty-level mock of open

unittest:
  - Mock out open calls via builtin
  - Create unittest/helper.py with mock_open context manager
  - Handle module name difference between python2.7 and 3.0 via try-except
  - Split wipe_zero and wipe_random into separate tests

tox.ini:
  - add a 'trusty-py3' and 'trusty-py2' tox environment with more
    specific versions as to what is on trusty.

424. By Ryan Harper

block/mdadm: add option to ignore mdadm_assemble errors

When wiping disks with mdadm partitions we may encounter unexpected
return codes. In the case of wiping disks, we don't care if we
observe any error so allow wipe to ignore the errors by explicitly
passing in ignore errors.

423. By Ryan Harper

curtin/doc: overhaul curtin documentation for readthedocs.org

Add additional documentation on custom storage and network configuration
Integrate some development documentation in Sphinx format and update
the build scripts for docs to import curtin version from python code.

422. By Ryan Harper

curtin.util: re-add support for RunInChroot

In merge committed to trunk in revno 404, we dropped util.RunInChroot.
That method was being used from curthooks in lp:maas-images project to
run commands in target via util.ChrootableTarget. In order to support
installation of old images that depend on RunInChroot we need to add
the method back.

This merge does that by wrapping ChrootableTarget class. It also adds
a couple unit tests to ensure that this keeps working.

421. By Ryan Harper

curtin/net: overhaul of eni rendering to handle mixed ipv4/ipv6 configs

To ensure complete ipv4/ipv6 support for advanced and stacked
configurations update how curtin.net renders /etc/network/interfaces for
different releases (precise -> yakkety). ifupdown has subtle issues with
various networking features and curtin needs to ensure consistent
behavior.

- Propery handle emitting the 'auto' control tag for stacked interfaces,
  like vlans over bonds
- Workaround LP:1609367 by rendering ifupdown hooks to handle the various
  cases. This works generically in all ubuntu releases
- Add vmtests for mtu settings
- Drop the use of ipv4 alias interfaces (eth0:1, eth0:2) and instead just
  add additional e/n/i stanzas. ifupdown already uses iproute2's /sbin/ip
  which supports adding additional ip addresses to an interface without the
  use of the v4-only interface alias structure. This provides consistent
  behavior for all types of interfaces (physical, vlan, bonds, and stacked
  interfaces) across all releases. Two side-effects: 1) users can no longer
  `ifdown eth0:1` to remove a single ip address from an interface; if down
  eth0 will take _all_ ip addresses on that interface. 2) ifconfig output
  only shows *one* ipv4 address, so users will need to use /sbin/ip addr
  show <interface> to see all ip addresses assigned to an interface.
- Add vmtests for alias settings
- Restructure all of the common network testcases into a single class
  TestNetworkTestBaseAbs, all varients testing network inherit from this
  class and override only the config file and any special case test-cases
  and file collection
- Global replace of testcase use of 'with open' and instead use
  load_collect_file()
  - Fix falsepositive uefi and multipath test this replacement exposed.
- Add ip_a_to_dict parser for `/sbin/ip a` output
  - drop ifconfig_a parser

420. By Ryan Harper

curtin.block: refactor clear_holders logic into block.clear_holders and cli cmd

Add block.clear_holders, which provides the ability to cleanly shut down
storage layers on a device, allowing that device to be reformatted without
having to reboot the system.

Introduce curtin command 'clear-holders' to provide an external
interface for this functionality.

419. By Ryan Harper

curtin.apply_net should exit non-zero upon exception.

418. By Scott Moser

apt: fix bug in disable_suites if sources.list line is blank.

if disable_suites was provided with a sources.list that had blank
lines, it would throw a IndexError. This fixes that bug and adds
a unit test.

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