~multani/cloud-init:fix-1634678

Last commit made on 2017-03-23
Get this branch:
git clone -b fix-1634678 https://git.launchpad.net/~multani/cloud-init
Only Jonathan Ballet can upload to this branch. If you are Jonathan Ballet please log in for upload directions.

Branch merges

Branch information

Name:
fix-1634678
Repository:
lp:~multani/cloud-init

Recent commits

892c429... by Jonathan Ballet <email address hidden>

Fix filesystem creation when using "partition: auto"

Accordingly to the documentation:

    The ``partition`` option may also be set to ``auto``, in which this
    module will search for the existance of a filesystem matching the
    ``label``, ``type`` and ``device`` of the ``fs_setup`` entry and
    will skip creating the filesystem if one is found.

However, using this "auto" flag always recreates the partition no matter
if it has been done before or not.

This commit fixes a bug in which the "partition" attribute was always
set to None although in some cases it should not.

LP: #1634678

2e879da... by Scott Moser

ds-identify: fix bug where filename expansion was left on.

The script is written to have the protection of disabling filename
expansion (set -f) and explicitly enabling expansion when needed.
However, the check_config function failed to disable it after enabling.

de63d66... by Scott Moser

advertise network config v2 support (NETWORK_CONFIG_V2) in features.

ef18b8ac4c added support for handing network config v2 (aka netplan
format). This just adds that feature to the list of supported features.

e1a1854... by root <email address hidden>

Bigstep: fix bug when executing in python3.

Python 2's json.loads would accept bytes, so this bug was
only exposed in 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