~prometheanfire/cloud-init:fix-gentoo-init

Last commit made on 2016-10-07
Get this branch:
git clone -b fix-gentoo-init https://git.launchpad.net/~prometheanfire/cloud-init
Only Matthew Thode can upload to this branch. If you are Matthew Thode please log in for upload directions.

Branch merges

Branch information

Name:
fix-gentoo-init
Repository:
lp:~prometheanfire/cloud-init

Recent commits

831cecc... by Matthew Thode

update Gentoo initscripts to run in the correct order

cloud-init-local needs to be run before net (and in the boot runlevel)
as it sets up networking config and adds it to the default runlevel.

cloud-init-local needs to be run in the boot runlevel because it
modifies services in the default runlevel. When a runlevel is started
it is cached, so modifications that happen to the current runlevel while
you are in it are not acted upon.

cloud-init needs to run after net, it does not need net because we still
want it to set up other things if it can.

94fd35e... by Scott Moser

systemd: run cloud-init.service Before dbus.service

This is the best work around we have for an issue seen when dns is used
during cloud-init.service on a system that is configured in nsswitch
to use systemd-resolved. The problem is that cloud-init.service was
blocking basic.target, and dbus would not be available until after
cloud-init.service finished.

LP: #1629797

760a4f1... by Ryan Harper

unittests: fix use of mock 2.0 'assert_called' when running make check

Some of the new DigitalOcean unittests were written to use 'assert_called',
which is only available in mock versions 2.0. Because of this, the failure
would only occur in releases less than yakkety and not in 'tox'.

Add a 'xenial' entry to tox.ini with versions from xenial.

1071b99... by Wesley Wiedenmeier

Improve module documentation and doc cleanup.

This adds lots of config module documentation in a standard format.
It will greatly improve the content at readthedocs.
Additionally:
 * Add a 'doc' env to tox.ini
 * Changed default highlight language for sphinx conf from python to yaml
   most examples in documentation are yaml configs
 * Updated datasource examples to highlight sh code properly

02f6c4b... by Stéphane Graber

lxd: Update network config for LXD 2.3

Prior to LXD 2.3, the bridge configuration was done through distro
packaging. Thus, lxd module interacted with debconf.
With 2.3 and higher, this is now done inside LXD itself, so we
need to use "lxc network" there.

For now, this perfectly matches what we had before with debconf and
doesn't cover any of the new options. We can always add those later.

A set of tests similar to what we had for debconf has been added to make
sure things look good.

This is tested in Yakkety container running LXD 2.3 and all options seem
to be passed through as expected, giving me the bridge I defined.

Signed-off-by: Stéphane Graber <email address hidden>

9f83bb8... by Ben Howard

DigitalOcean: use meta-data for network configruation

On DigitalOcean, Network information is provided via Meta-data.
It changes the datasource to be a local datasource, meaning it
will run before fallback networking is configured.

The advantage of that is that before networking is configured it
can bring up a network device with ipv4 link-local and hit the
metadata service that lives at 169.254.169.254 to find its networking
configuration. It then takes down the link local address and lets
cloud-init configure networking.

The configuring of a network device to go looking for a metadata
service is gated by a check of data in the smbios. This guarantees
that the code will not run on another system.

6d1edc3... by Scott Moser

ntp: move to run after apt configuration

since ntp module may try to install packages, it needs to run after
apt is configured.

LP: #1628337

0439d8a... by Robert Schweikert

Decode unicode types in decode_binary

The test in decode_binary for six.text_type was incorrect as that includes
unicode type in Python 2 which should actually be decoded.

When the type is string_types we now properly check only for basestring and
str in Python 2 and Python 3 respectively and return the given blob without
making an attempt to decode.

1b71b47... by Joshua Harlow

systemd: Ensure that cloud-init-local happens before NetworkManager

30d0adb... by Paul Meyer

Allow ephemeral drive to be unpartitioned

If device has no partition table, the first line of output from `sgdisk
-p <device>` will be "Creating new GPT entries.", instead of something
like "Disk /dev/sdb: 266338304 sectors, 127.0 GiB".

Also, protect against localized output by adjusting subp calls that
parse sgdisk output to set LANG=C.