~alexandru-sirbu/cloud-init:bigstep-quickfix

Last commit made on 2017-03-21
Get this branch:
git clone -b bigstep-quickfix https://git.launchpad.net/~alexandru-sirbu/cloud-init
Only Alex Sirbu can upload to this branch. If you are Alex Sirbu please log in for upload directions.

Branch merges

Branch information

Name:
bigstep-quickfix
Repository:
lp:~alexandru-sirbu/cloud-init

Recent commits

c81902a... by root <email address hidden>

Compatibility with Python3

192dbda... by Scott Moser

Fix unit test when running in a system deployed with cloud-init.

test_netconfig.py:test_apply_network_config_eni_ub would attempt to
remove any .link files that cloud-init had written. This was just
a failure to mock out all of its interaction with the host.

86715c8... by Brent Baude

Bounce network interface for Azure when using the built-in path.

When deploying on Azure and using only cloud-init, you must "bounce" the
network interface to trigger a DDNS update. This allows dhclient to
register the hostname with Azure so that DNS works correctly on their
private networks (i.e. between vm and vm).

The agent path was already doing the bounce so this creates parity
between the built-in path and the agent.

LP: #1674685

ef18b8a... by Ryan Harper

cloudinit.net: add network config v2 parsing and rendering

Network configuration version 2 format is implemented in a package
called netplan (nplan)[1] which allows consolidated network config
for multiple network controllers.

- Add a new netplan renderer
- Update default policy, placing eni and sysconfig first
  This requires explicit policy to enable netplan over eni
  on systems which have both (Yakkety, Zesty, UC16)
- Allow any network state (parsed from any format cloud-init supports) to
  render to v2 if system supports netplan.
- Move eni's _subnet_is_ipv6 to common code for use by other renderers
- Make sysconfig renderer always emit /etc/syconfig/network configuration
- Update cloud-init.service systemd unit to also wait on
  systemd-networkd-wait-online.service

1. https://lists.ubuntu.com/archives/ubuntu-devel/2016-July/039464.html

9040e78... by Joshua Powers

net: Fix incorrect call to isfile

Previous commit introduced a regression by calling os.path.is_file, a
non-existent function. This changes that call to use os.path.isfile.

LP: #1674317

5beecdf... by Scott Moser

net: add renderers for automatically selecting the renderer.

Previously, the distro had hard coded which network renderer it would
use. This adds support for just picking the right renderer based
on what is available.

Now, that can be set via a priority in system_info, but should
generally work. That config looks like:
 system_info:
   network:
     renderers: ["eni", "sysconfig"]

When no renderers are found, a specific RendererNotFoundError is raised.
stages.py is modified to catch that and log it at error level. This
path should not really be exercised, but could occur if for example an
Ubuntu system did not have ifupdown, or a rhel system did not have
sysconfig. In such a system previously we would have quietly rendered
ENI configuration but that would have been ignored. This is one step
better in that we at least log the error.

58cc8f7... by Scott Moser

doc: fix config drive doc with regard to unpartitioned disks.

The ConfigDrive datasource has read un-partitioned disks for quite
a while, but the documentation lagged behind.

LP: #1673818

41950e9... by Joshua Powers

test: Adding integratiron test for password as list

This adds an integration test for setting passwords when given
as a list rather than a string. This also updates the docs and
tests so that Random is now RANDOM as is correct.

a334473... by Scott Moser

render_network_state: switch arguments around, do not require target

render_network_state should default to rendering on /.
The changes here just make it so render_network_state does not
require a target, but defaults to None, and uses target_path
to handle that.

1a2ca75... by Scott Moser

support 'loopback' as a device type.

As reported in bug 1671927, sysconfig had an issue with rendering
a loopback device. The problem was that some as yet unknown issue was
causing the openstack config drive to parse the provided ENI file rather
than reading the network_data.json. Parsing an ENI file would add a
a 'lo' device of type 'physical', and sysconfig was failing to render
that.

The change here is:
 a.) add a 'loopback' type rather than 'physical' for network config.
     {'name': 'lo', 'type': 'loopback', 'subnets': ['type': 'loopback']}
 b.) support skipping that type in the eni and sysconfig renderers.
 c.) make network_state just piggy back on 'physical' renderer for
     loopback (this was what was happening before).

Tests are added for eni and sysconfig renderer.