Last commit made on 2018-06-15
Get this branch:
git clone -b lp.1134036 https://git.launchpad.net/~vorlon/cloud-init
Only Steve Langasek can upload to this branch. If you are Steve Langasek please log in for upload directions.

Branch merges

Branch information


Recent commits

70743ab... by Steve Langasek on 2018-06-15

Fix up invalid locales in the login environment; don't print warning messages.

Invalid locales in the environment at login (e.g. as provided by ssh
SendEnv from a client system which has a different set of available locales
than the server) currently result in a large warning message (once, per
login user, per instance) and a broken environment.

On Ubuntu systems, and probably others, this broken environment results in
wrong runtime behavior vs if no locale had been passed at all by the client;
in particular, Ubuntu systems will give UTF-8 as a character set by default
(either the en_US.UTF-8 or C.UTF-8 locale, depending on the version of
Ubuntu), and if an invalid locale is specified, the login instead will use
ASCII as the only supported character set.

This change reworks cloud-init's profile handling to:
 - fix up any invalid locale settings detected in the environment, so that
   the login session does not unnecessarily lose non-ascii character support
   due to a requested missing locale
 - remove the warning message, which is of disputed value.

This approximates the OpenSSH upstream guidance regarding a correct design
for this in OpenSSH itself, as described at
<https://bugzilla.mindrot.org/show_bug.cgi?id=1346#c38>, but will work on
all systems which do not have an ssh client+server that implement that does
not implement this proposed design (i.e.: all clients and servers currently
in existence).

LP: #1134036

faa6f07... by Scott Moser on 2018-06-13

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 on 2018-06-13

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 on 2018-06-12

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

d0f6c46... by Chad Smith on 2018-06-12

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.

5ffcb51... by Chad Smith on 2018-06-12

tests: skip chrony integration tests on lxd running artful or older

A fix for chrony support per LP: #1589780 is not expected in Artful or
older series. Skip the chrony suite of tests when running on a container
and ubuntu series represented is <= artful as errors are expected.

7b3c216... by Chad Smith on 2018-06-12

test: add optional --preserve-instance arg to integraiton tests

By default, integration tests destroy the test instances after each
test run. To aid debug and development of integration tests, support a
--preserve-instance argument which will leave the modified test instance
in a stopped state for further debug.

c3f1ad9... by Chad Smith on 2018-06-12

netplan: fix mtu if provided by network config for all rendered types

When network configuration for any interface defines maximum transmission
values (MTU) the netplan, eni and sysconfig renders will take into account
any device-level, or subnet-level mtu values.

When network configuration has conflicting device-level and ipv4 subnet
mtu values, the subnet-specific value is honored and a warning will be
logged about any ignored device-level setting.

LP: #1774666

fc23ccc... by Scott Moser on 2018-06-08

tests: remove pip install workarounds for pylxd, take upstream fix.

pylxd upstream provided a fix for the issue we were seeing, so we
can take that fix now rather than having our workarounds to order pip

The test is that this continues to work:
   rm -Rf .tox/citest
   tox -c tox.ini --recreate --notest -e citest

9a41fce... by Scott Moser on 2018-06-08

subp: support combine_capture argument.

This adds 'combine_capture' argument as was present in curtin's
subp. It is useful to get interleaved output of a command. I noticed
a need for it when looking at user_data_rhevm in DataSourceAltCloud.
That will run a subcommand, logging its stdout but swallowing its stderr.

Another thing to change to use this would be in udevadm_settle which
currently just returns the subp() call.

Also, add the docstring copied from curtin's subp.