~smoser/cloud-init:fix/tip-pylint-20181210

Last commit made on 2018-12-10
Get this branch:
git clone -b fix/tip-pylint-20181210 https://git.launchpad.net/~smoser/cloud-init
Only Scott Moser can upload to this branch. If you are Scott Moser please log in for upload directions.

Branch merges

Branch information

Name:
fix/tip-pylint-20181210
Repository:
lp:~smoser/cloud-init

Recent commits

5a2d586... by Scott Moser

fix pycodestyle

f0df73a... by Scott Moser

update pylint version to 2.2.2

336a013... by Scott Moser

Azure: Fix incorrect string format.

Fix incorrect order in a format string. If the old code would have
been hit, a stacktrace would have been raised.

a4007d0... by James Baxter

write_files: add support for appending to files.

Add 'append: true' to write_files entries to append 'content' to file
specified by 'path' key. This modifies the file open mode to append.

a582a2d... by Scott Moser

config: On ubuntu select cloud archive mirrors for armel, armhf, arm64.

Infrastructure is now set up for Ubuntu to handle Amazon instances
hitting a ports archive at:
   - http://%(ec2_region)s.ec2.ports.ubuntu.com/ubuntu-ports/

And additionally, generic mirrors at
   *.clouds.ports.ubuntu.com/ubuntu-ports

The change here will utilize those mirrors for the arm64, armel and
armhf arches.

We've decided to limit the auto-selection of those
mirrors to arm, where we know a use case. That way new instances
of ppc64el or other arches will not select them. Such a behavior change
could be problematic for a user in a firewalled environment.

LP: #1805854

230e67e... by Scott Moser

dhclient-hook: cleanups, tests and fix a bug on 'down' event.

I noticed a bug in dhclient_hook on the 'down' event, using 'is'
operator rather than '==' (if self.net_action is 'down').

This refactors/simplifies the code a bit for easier testing and adds
tests. The reason for the rename of 'action' to 'event' is to just
be internally consistent. The word and Namespace 'action' is used
by cloud-init main, so it was not really usable here.

Also adds a main which can easily be debugged with:
  CI_DHCP_HOOK_DATA_D=./my.d python -m cloudinit.dhclient_hook up eth0

adbd950... by Scott Moser

NoCloud: Allow top level 'network' key in network-config.

NoCloud's 'network-config' file was originally expected to contain
network configuration without the top level 'network' key. This was
because the file was named 'network-config' so specifying 'network'
seemed redundant.

However, JuJu is currently providing a top level 'network' config when
it tries to disable networking ({"network": {"config": "disabled"}).
Other users have also been surprised/confused by the fact that
a network config in /etc/cloud/cloud.cfg.d/network.cfg differed from
what was expected in 'network-config'.

LP: #1798117

cb44ad6... by Ryan Harper

ovf: Fix ovf network config generation gateway/routes

Move routes under the nic's subnet rather than use top-level
("global") route config ensuring all net renderers will provide the
configured route.

Also updated cloudinit/cmd/devel/net_convert.py:
 - Add input type 'vmware-imc' for OVF customization config files
 - Fix bug when output-type was netplan which invoked netplan
   generate/apply and attempted to write to
   /etc/netplan/50-cloud-init.yaml instead of joining with the
   output directory.

LP: #1806103

bf79171... by Tamilmani Manoharan

azure: detect vnet migration via netlink media change event

Replace Azure pre-provision polling on IMDS with a blocking call
which watches for netlink link state change messages. The media
change event happens when a pre-provisioned VM has been activated
and is connected to the users virtual network and cloud-init can
then resume operation to complete image instantiation.

c7c395c... by Adam DePue

Azure: fix copy/paste error in error handling when reading azure ovf.

Check the appropriate variables based on code review. Correcting what
seems to be a copy/paste mistake for the error handling from a few lines
above.