~raharper/cloud-init:fix/lp-1750884-netplan-global-dns

Last commit made on 2018-03-22
Get this branch:
git clone -b fix/lp-1750884-netplan-global-dns https://git.launchpad.net/~raharper/cloud-init
Only Ryan Harper can upload to this branch. If you are Ryan Harper please log in for upload directions.

Branch merges

Branch information

Name:
fix/lp-1750884-netplan-global-dns
Repository:
lp:~raharper/cloud-init

Recent commits

ade0717... by Ryan Harper

Handle global dns entries in netplan

In network config v1 format, there are dns values which are not bound
to a specific interface and do not map to the per-interface format in
netplan. To handle this case we render netplan configuration that duplicates
the DNS configuration on any interface that has a static network config.
We avoiding interfaces which have DHCP configuration which may provide
conflicting DNS values.

LP: #1750884

7713713... by Kurt Garloff

Identify OpenTelekomCloud Xen as OpenStack DS.

Open Telekom Cloud gen1 (Xen) hosts do not provide nova product
names in DMI but Xen HVM domU. They can however be safely identified
by the OpenTelekomCloud Chassis asset tag. OpenTelekomCloud does
use the network OpenStack DataSource, so we better detect it.

LP: #1756471

685f990... by Chad Smith

datasources: fix DataSource subclass get_hostname method signature

DataSource.get_hostname call signature changed to allow for metadata_only
parameter. The metadata_only=True parameter is passed to get_hostname
during init-local stage in order to set the system hostname if present in
metadata prior to initial network bring up.

Fix subclasses of DataSource which have overridden get_hostname to allow
for metadata_only param.

LP: #1757176

7deec7b... by Akihiko Ota

OpenNebula: Update network to return v2 config rather than ENI.

OpenNebulaNetwork.gen_conf() was previously returning ENI format.
This is updated to return netplan/v2 config.
The changes here also adds support for IPv6 configuration distributed
from OpenNebula and fixes some issues about nameserver information.

e88e354... by Scott Moser

Add Hetzner Cloud DataSource

The Hetzner Cloud metadata service is an AWS-style service available
over HTTP via the link local address 169.254.169.254.

https://hetzner.com/cloud
https://docs.hetzner.cloud/

de34dc7... by Scott Moser

net: recognize iscsi root cases without ip= on kernel command line.

When 'ip=' or 'ip6=' is found on the kernel command line,
cloud-init will consider read network config from /run/net-*.conf files.

There are some iscsi-root scenarios where initramfs configures networking
but the ip= parameter is not present. 2 such cases are:
 a.) static config in /etc/iscsi/iscsi.initramfs (copied into the
initramfs)
 b.) iBft

This changes cloud-init to consider initramfs provided networking
information if:
 * there are /run/net-* files and
 * (ip= or ip6 is on the command line) or open-iscsi.interface file
exists.

LP: #1752391

7ce839f... by Chad Smith

tests: fix flakes warning for unused variable

c6f153e... by Chad Smith

tests: patch leaked stderr messages from snap unit tests

a1f678f... by Chad Smith

cc_snap: Add new module to install and configure snapd and snap packages.

Support installing and configuring snaps on ubuntu systems. Now,
cloud-config files can provide a list or dictionary of snap:assertions
which will be allow configuration of snapd on a system via 'snap ack'
calls. The snap:commands configuration option supports arbitrary system
commands intended to interact with snappy's cli. This allows users to run
arbitrary snappy commands to create users, download, install and
configure snap packages and snapd.

This branch also deprecates old snappy and snap_config modules leaving
warnings in documentation and runtime for consumers of these modules.
Deprecated snap* modules will be dropped in cloud-init v.18.2 release.

95bb226... by Scott Moser

tests: Make pylint happy and fix python2.6 uses of assertRaisesRegex.

Older unittest2.TestCase (as seen in CentOS 6) do not have an
assertRaisesRegex method. They only have the now-deprecated
assertRaisesRegexp.

We need our unit tests to work there and on newer python (3.6).
Simply making assertRaisesRegex = assertRaisesRegexp makes pylint
complain as described in https://github.com/PyCQA/pylint/issues/1946 .

What was here before this commit was actually broken. This commit
makes assertRaisesRegex functional in CentOS 6 and works around
the invalid Deprecated warning from pylint.

To prove this, we use assertRaisesRegex in a unit test which will
be exectued in py27, py3 and py26.