Last commit made on 2017-04-08
Get this branch:
git clone -b lp/1541196 https://git.launchpad.net/~larsks/cloud-init
Only Lars Kellogg-Stedman can upload to this branch. If you are Lars Kellogg-Stedman please log in for upload directions.

Branch merges

Branch information


Recent commits

336e21a... by Lars Kellogg-Stedman

limit permissions on def_log_file

This sets a default mode of 0600 on def_log_file, and makes this
configurable via the def_log_file_mode option in cloud.cfg.

LP: #1541196
Resolves: rhbz#1424612

61eb03f... by Scott Moser

OpenStack: add 'dvs' to the list of physical link types.

Links presented in network_data.json to the guest running on ESXi
are of type 'dvs'.

LP: #1674946

bf7723e... by Scott Moser

Fix bug that resulted in an attempt to rename bonds or vlans.

When cloud-init ran in the init stage (after networking had come up).
A bug could occur where cloud-init would attempt and fail to rename
network devices that had "inherited" mac addresses.

The intent of apply_network_config_names was always to rename only
the devices that were "physical" per the network config. (This would
include veth devices in a container). The bug was in creating
the dictionary of interfaces by mac address. If there were multiple
interfaces with the same mac address then renames could fail.
This situation was guaranteed to occur with bonds or vlans or other
devices that inherit their mac.

The solution is to change get_interfaces_by_mac to skip interfaces
that have an inherited mac.

Also drop the 'devs' argument to get_interfaces_by_mac. It was
non-obvious what the result should be if a device in the input
list was filtered out. ie should the following have an entry for
bond0 or not. get_interfaces_by_mac(devs=['bond0'])

LP: #1669860

5442b51... by Scott Moser

tests: update OpenNebula and Digital Ocean to not rely on host interfaces.

Mock the use use of get_interfaces_by_mac in Digital Ocean and OpenNebula.
Its best to mock this for the tests as the results aren't expecting
it to fail.

Note, as it stands, OpenNebula relies on devices named 'eth0'.
The metadata (context) does not provide mac addresses.

d23543e... by Scott Moser

net: in netplan renderer delete known image-builtin content.

When rendering network configuration to netplan, remove known
"builtin" configurations. The specific example here is Ubuntu Core
that has netplan configuration in etc/netplan/00-snapd-config.yaml.

We also delete the derived files since netplan will have created
these derived files in its generator that runs well before cloud-init.

LP: #1675576

b704110... by David Tagatac

doc: correct grammar in capabilities.rst

a68e7d5... by Scott Moser

ds-identify: fix detecting of maas datasource.

The reading of MAAS datasource configuration was simply broken.
it was looking in /etc/cloud/*maas*.cfg rather than

along side here there is also:
 * doc improvement on check_config
 * remove the path restrictions when searching for values in both
   maas and ovf_vmware_guest_customization. that was done to improve
   performance as check_config's parsing is slow.
 * change to maas to search all config files rather than restricting
   to a subset as it tried before. that was done for
 * better variable names.
    - rename path_cloud_confd to path_etc_cloud
    - PATH_ETC_CLOUD: /etc/cloud
    - PATH_ETC_CI_CFG: /etc/cloud/cloud.cfg
    - PATH_ETC_CI_CFG_D: /etc/cloud/cloud.cfg.d

LP: #1677710

18762d7... by Ryan Harper

netplan: remove debugging prints, add debug logging

Remove debugging print statements. Change a few to use
logging.debug() where useful.

32b21ee... by Scott Moser

ds-identify: do not write None twice to datasource_list.

If the only the None datasource was listed in datasource_list, then
ds-identify would write a cloud.cfg witih:
 datasource_list: [None, None]

The fix is to just append None if the list only has None.

0e2030c... by Steve Langasek

support resizing partition and rootfs on system booted without initramfs.

When booted without an initramfs, the root device will be /dev/root, not a
named device. There is partial support for this when resizing filesystems,
but not for growing partitions, without which it doesn't do much good. Move
the /dev/root resolution code to util.py and use it from cc_growpart.py.

Also, booting without an initramfs only works with a root= argument that's
either a kernel device name (which is unstable) or a partition UUID. Handle
the case of root=PARTUUID=value, not just LABEL and UUID.

LP: #1677376