~raharper/cloud-init:default-lang-c-utf8

Last commit made on 2017-08-30
Get this branch:
git clone -b default-lang-c-utf8 https://git.launchpad.net/~raharper/cloud-init
Only Ryan Harper can upload to this branch. If you are Ryan Harper please log in for upload directions.

Branch merges

Branch information

Name:
default-lang-c-utf8
Repository:
lp:~raharper/cloud-init

Recent commits

29ab5e4... by Ryan Harper

distro: allow distro to specify a default locale

Currently the cloud-init default locale (en_US.UTF-8) is set by
the base datasource class. This patch allows a distro to overide
the fallback value with one that's available in the distro but continues
to respect an image which has preconfigured a locale.

- Distro object now has a get_locale method which will return a preconfigure
  locale setting by checking the distros locale system configuration file.
  If not set or not present, return the default locale of en_US.UTF-8 which
  retains behavior of all previous cloud-init releases
- Apply locale now handles regenerating locales or system configuraion files
  as needed.
- Adjust apply_locale logic to skip locale-regen if the specified LANG value is
  C.UTF-8,C, or POSIX; they do not require regeneration.
- Further add unittests to exercise the default paths for Ubuntu and
  non-ubuntu paths to validate they get the LANG expected.

b931a64... by Chad Smith

url_helper: dynamically import oauthlib import from inside oauth_headers

oauth_headers is the only function which requires oauthlib, move the
import and ImportError handling inside this function to only attempt
loading at runtime if called. This will allow us to build on platforms
that don't have python-oauthlib installed by default. Add simple unittests
around the missing oauthlib dependencies to make sure the function
performs as intended and raises and NotImplementedError if oauthlib can't
be imported.

502082f... by Scott Moser

tox: make xenial environment run with python3.6

The pinned versions of python packages in xenial do not work with
python3.6. Currently, the failure can be seen with:
 $ tox -e xenial tests/unittests/test_merging.py
which ends up failing with in /usr/lib/python3.6/inspect.py with:
  ValueError: Function has keyword-only parameters or annotations, use
  getfullargspec() API which can support them

Instead of setting 'basepython' to 3.5 for the 'xenial', we just update
the one package that does not run correctly with python3.6. That allows
the developer to have either python3.5 or python3.6 installed and have
tox work as expected.

cbda576... by Robert Schweikert

suse: Add support for openSUSE and return SLES to a working state.

This gets initial opensuse and SLES support back to a working state.
Still missing is more complete network file writing and unit tests.

44529c1... by Scott Moser

GCE: Add a main to the GCE Datasource.

This just adds a main to the GCE datasource so that it is easily
callable: python3 -m cloudinit.sources.DataSourceGCE
It also adds a log of the time it took to crawl.

3c45330... by Chad Smith

ec2: Add IPv6 dhcp support to Ec2DataSource.

DataSourceEc2 now parses the metadata for each nic to determine if
configured for ipv6 and/or ipv4 addresses. In AWS for metadata version
2016-09-02, nics configured for ipv4 or ipv6 addresses will have non-zero
values stored in metadata at network/interfaces/macs/<MAC>/public-ipv4 or
ipv6s respectively. Those metadata files are only non-zero when an ipv4 or
ipv6 ip is associated to the specific nic. A new
DataSourceEc2.network_config property is added which parses the metadata
and renders a network version 1 dictionary representing both dhcp4 and
dhcp6 configuration for associated nics.

The network configuration returned from the datasource will also 'pin' the
nic name to the name presented on the instance for each nic.

LP: #1639030

af4630c... by Lars Kellogg-Stedman

url_helper: fail gracefully if oauthlib is not available

We are unable to ship python-oauthlib in RHEL. This commit allows
imports of url_helper to succeed even when oauthlib is unavailable
and OauthUrlHelper.oauth_headers to raise a NotImplementedException
when called.

LP: #1713760

0ab9859... by Andrew Jorgensen

cloud-init analyze: fix issues running under python 2.

Some Python 3 exception names crept into the cloud-init analyze code. This
patches those back out at a cost of catching less specific parents of the
desired exceptions.

556a022... by Ryan Harper

Configure logging module to always use UTC time.

Currently the python logging module will default to a local time which may
contain an TZ offset in the values it produces, but the logged time format
does not contain the offset. Switching to UTC time for logging produces
consistent values in the cloud-init.log file and avoids issues when the
timezone is changed during boot.

LP: #1713158

20ca23c... by Andrew Jorgensen

Log a helpful message if a user script does not include shebang.

A patch to allow scripts missing a #! to run by using shell=True was
proposed but rejected. Instead we emit a log message to help the user
understand what went wrong.