~chad.smith/cloud-init:release/18.3

Last commit made on 2018-06-20
Get this branch:
git clone -b release/18.3 https://git.launchpad.net/~chad.smith/cloud-init
Only Chad Smith can upload to this branch. If you are Chad Smith please log in for upload directions.

Branch merges

Branch information

Name:
release/18.3
Repository:
lp:~chad.smith/cloud-init

Recent commits

2d6e421... by Chad Smith

release 18.3

Bump the version in cloudinit/version.py to be 18.3 and update ChangeLog.

LP: #1777743

a670eb8... by Chad Smith

docs: represent sudo:false in docs for user_groups config module

4d69fb4... by Jacob Bednarz

Explicitly prevent `sudo` access for user module

To deny a user elevated access, you can omit the `sudo` key from the
`users` dictionary. This works fine however it's implicitly defined
based on defaults of `cloud-init`. If the project moves to have `sudo`
access allowed for all by default (quite unlikely but still possible)
this will catch a few people out.

This introduces the ability to define an explicit `sudo: False` in the
`users` dictionary and it will prevent `sudo` access. The behaviour is
identical to omitting the key.

LP: #1771468

4ce6720... by Scott Moser

lxd: Delete default network and detach device if lxd-init created them.

Newer versions (3.0.1+) of lxd create the 'lxdbr0' network when
'lxd init --auto' is invoked.

When cloud-init is given a network configuration to pass on to
lxc and that config had no name specified or 'lxdbr0', then cloud-init
would fail to create the network as it already exists.

Similarly, we need to remove the device from the default profile
so that the attach code can work.

Also, add a _lxc method and use it to make sure we're getting the
--force-local flag everywhere.

LP: #1776958

1efa8a0... by Chad Smith

openstack: avoid unneeded metadata probe on non-openstack platforms

OpenStack datasource is now discovered in init-local stage. In order to
probe whether OpenStack metadata is present, it performs a costly
sandboxed dhclient setup and metadata probe against http://169.254.169.254
for openstack data.

Cloud-init properly detects non-OpenStack on EC2, but it spends precious
time probing the metadata service also resulting in a confusing WARNING
log about 'metadata not present'. To avoid the wasted cycles, and
confusing warning, get_data will call a detect_openstack function to
quickly determine whether the platform looks like OpenStack before trying
to setup network to probe and crawl the metadata service.

LP: #1776701

fef2616... by Robert Schweikert

stages: fix tracebacks if a module stage is undefined or empty

In /etc/cloud/cloud.cfg, users and imagees can configure which modules run
during a specific cloud-init stage by modifying one of the following
lists: cloud_init_modules, cloud_init_modules, cloud_init_final_modules.

If any of the configured module lists are absent or empty, cloud-init will
emit the same message it already does for existing lists that only contain
modules which are not unsupported on that platform:

No 'config' modules to run under section 'cloud_config_modules'

LP: #1770462

faa6f07... by Scott Moser

Be more safe on string/bytes when writing multipart user-data to disk.

When creating the multipart mime message that is written as
user-data.txt.i, cloud-init losing data on conversion to some things
as a string.

LP: #1768600

Author: Scott Moser <email address hidden>
Co-Authored-By: Chad Smith <email address hidden>

1713786... by Scott Moser

Fix get_proc_env for pids that have non-utf8 content in environment.

There is no requirement that the environment of a process contains
only utf-8 data. This modifies get_proc_env to support it reading
data as binary and decoding if provided with an encoding.

The default case is now that we now do:
 contents.decode('utf-8', 'replace')
rather than
 contents.decode('utf-8', 'strict')

LP: #1775371

27283c3... by Chad Smith

tests: fix salt_minion integration test on bionic and later

In ubuntu, the salt-minion package version 2017.7.4+dfsg1-1 or later
automatically moves any seed keys from /etc/salt/pki/minion/ to
/var/lib/salt/pki/minion/. Fix integration tests to collect
either files in either /etc/salt/pki/minion/ or
/var/lib/salt/pki/minion/.

d0f6c46... by Chad Smith

tests: provide human-readable integration test summary when --verbose

Integration tests will now provide a brief summary for test failures
listed by platform and distribution. The failure summary will only consist
of failed test name and assert error message.

Drop the verbose dictionary of all integration test output because this
content is unreadable given the large number of integration test results
listed within this dictionary.