Last commit made on 2018-09-25
Get this branch:
git clone -b master
Members of cloud-init commiters can upload to this branch. Log in for directions.

Branch merges

Branch information


Recent commits

fc4b966... by Chad Smith 9 hours ago

cli: add cloud-init query subcommand to query instance metadata

Cloud-init caches any cloud metadata crawled during boot in the file
/run/cloud-init/instance-data.json. Cloud-init also standardizes some of
that metadata across all clouds. The command 'cloud-init query' surfaces a
simple CLI to query or format any cached instance metadata so that scripts
or end-users do not have to write tools to crawl metadata themselves.

Since 'cloud-init query' is runnable by non-root users, redact any
sensitive data from instance-data.json and provide a root-readable
unredacted instance-data-sensitive.json. Datasources can now define a
sensitive_metadata_keys tuple which will redact any matching keys
which could contain passwords or credentials from instance-data.json.

Also add the following standardized 'v1' instance-data.json keys:
  - user_data: The base64encoded user-data provided at instance launch
  - vendor_data: Any vendor_data provided to the instance at launch
  - underscore_delimited versions of existing hyphenated keys:
    instance_id, local_hostname, availability_zone, cloud_name

0b0378d... by Scott Moser 13 hours ago

tools/tox-venv: update for new features.

This update to tox-venv allows you to do:
 ./tools/tox-venv py3 - tests/unittests/

1c63a4f... by Chad Smith on 2018-09-21

pylint: ignore warning assignment-from-no-return for _write_network

Distro subclasses arch, freebsd and debian still have a path with an
implemented _write_network method which has a return value. Can drop
this pylint ignore when _write_network is dropped from arch, freebsd
and debian.

f0ff194... by Scott Moser on 2018-09-20

stages: Fix bug causing datasource to have incorrect sys_cfg.

The Init object had a bug/odd side effect where when retrieving a distro
object it would update the datasources's sys_cfg. That was probably
intended to refresh the possibly stale config stored there. Unfortunately
what it actually did limit the config there to the 'system_info' top level
key where initially it had the whole config.

LP: #1787459

c368047... by Scott Moser on 2018-09-20

Remove dead-code _write_network distro implementations.

Any distro that has a '_write_nework_config' method should no
longer get their _write_network called at all. So lets drop
that code and raise a RuntimeError any time we got there.

Replace the one caller of 'apply_network' (legacy openstack path)
with a call to apply_network_config after converting the ENI to
network config.

98d18c3... by Thomas Berger on 2018-09-18

net_util: ensure static configs have netmask in translate_network result

If a DataSource provides a network configuration in version 2 and runs
on a distro which does not have a network renderer class in use, then
the conversion of V2 to eni results in static ip configurations with
subnet prefix-length ( rather than explicit netmask

When sending such a config to net_util.translate_network the resulting
dictionary is missing the 'netmask' key for static configured addresses
breaking network configurations on multiple distributions.

This patch detects static ip configurations using prefix-length and
converts the format into the previous 'address' and 'netmask' parts
to keep compatibility for these distribtuions until they move to
the v2 network configuration.

LP: #1792454

c714651... by Robert Schweikert on 2018-09-17

Fall back to root:root on syslog permissions if other options fail.

If the user has removed the default configuration file or does
not set the syslog_fix_perms config option the user still ends
up with a warning on SUSE distributions. Add root:root to the
default builtin config.

3707804... by Robert Schweikert on 2018-09-17

tests: Add mock for util.get_hostname.

At present the host network settings bleed into the test environment
causing the test test_handler_apt_source_v3 to fail if the host has a
domain setting other then localdomain.

LP: #1792799

bb60f61... by Scott Moser on 2018-09-14

ds-identify: doc string cleanup.

There was a typo in the doc string at the top of ds-identify
(disable -> disabled). That is fixed here as well as adding some
better examples on content in /etc/cloud/ds-identify.cfg.

c6cfed7... by Fabian Wiesel on 2018-09-14

OpenStack: Support setting mac address on bond.

Fix a bug where setting of mac address on a bond device was
ignored when provided in OpenStack network_config.json.

LP: #1682064