~xiaofengw/cloud-init:migrate-lp-to-github

Last commit made on 2019-11-27
Get this branch:
git clone -b migrate-lp-to-github https://git.launchpad.net/~xiaofengw/cloud-init
Only Xiaofeng Wang can upload to this branch. If you are Xiaofeng Wang please log in for upload directions.

Branch merges

Branch information

Name:
migrate-lp-to-github
Repository:
lp:~xiaofengw/cloud-init

Recent commits

3731459... by Xiaofeng Wang

lp-to-git-users: adding xiaofengw-vmware

Mapped from xiaofengw

aa3e496... by Ahmed

cloud_tests: add azure platform support to integration tests

Added Azure to cloud tests supporting upstream integration testing.

Implement the inherited platform classes, Azure configurations
to release/platform, and docs on how to run Azure CI.

b6055c4... by =?utf-8?q?Igor_Gali=C4=87?= <email address hidden>

set_passwords: support for FreeBSD (#46)

Allow setting of user passwords on FreeBSD

The www/chpasswd utility which we depended on for FreeBSD installations
does *not* do the same thing as the equally named Linux utility.

For FreeBSD, we now use the pw(8) utility (which can only process one
user at a time)

Additionally, we abstract expire passwd into a function, and override it
in the FreeBSD distro class.

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

250a3f9... by Chad Smith

tools: migrate-lp-user-to-github removes repo_dir if created (#35)

To run: ./tools/migrate-lp-user-to-github LAUCHPAD_USERNAME GITHUB_USERNAME

bf075cf... by do3meli <email address hidden>

Correct jumbled documentation for cc_set_hostname module (#64)

LP: #1853543

2a135c4... by =?utf-8?q?Igor_Gali=C4=87?= <email address hidden>

FreeBSD: fix for get_linux_distro() and lru_cache (#59)

Since `is_FreeBSD()` is used a lot, which uses `system_info()`, which uses `get_linux_distro()` we add caching, by decorating the following functions with `@lru_cache`:

- get_architecture()
- _lsb_release()
- is_FreeBSD
- get_linux_distro
- system_info()
- _get_cmdline()

Since [functools](https://docs.python.org/3/library/functools.html) only exists in Python 3, only python 3 will benefit from this improvement. For python 2, our shim is just a pass-thru. Too bad, but, also… https://pythonclock.org/

The main motivation here was, at first, to cache more, following the style of _lsb_release.
That is now consolidated under this very same roof.

LP: #1815030

aa935ae... by do3meli

lp-to-git-users: adding do3meli

Mapped from d-info-e

4bc399e... by Ryan Harper

ec2: Add support for AWS IMDS v2 (session-oriented) (#55)

* ec2: Add support for AWS IMDS v2 (session-oriented)

AWS now supports a new version of fetching Instance Metadata[1].

Update cloud-init's ec2 utility functions and update ec2 derived
datasources accordingly. For DataSourceEc2 (versus ec2-look-alikes)
cloud-init will issue the PUT request to obtain an API token for
the maximum lifetime and then all subsequent interactions with the
IMDS will include the token in the header.

If the API token endpoint is unreachable on Ec2 platform, log a
warning and fallback to using IMDS v1 and which does not use
session tokens when communicating with the Instance metadata
service.

We handle read errors, typically seen if the IMDS is beyond one
etwork hop (IMDSv2 responses have a ttl=1), by setting the api token
to a disabled value and then using IMDSv1 paths.

To support token-based headers, ec2_utils functions were updated
to support custom headers_cb and exception_cb callback functions
so Ec2 could store, or refresh API tokens in the event of token
becoming stale.

[1] https://docs.aws.amazon.com/AWSEC2/latest/ \
UserGuide/ec2-instance-metadata.html \
#instance-metadata-v2-how-it-works

310f860... by Scott Moser

tests: Fix cloudsigma tests when no dmidecode data is present. (#57)

The cloudsigma tests had few test cases that were not getting
all the "mocks" set up correctly. Specifically is_running_in_cloudsigma
was not getting replaced and calls would leak through to
util.read_dmi_data.

62bbc26... by Harald Jensås

net: IPv6, accept_ra, slaac, stateless (#51)

Router advertisements are required for the default route
to be set up, thus accept_ra should be enabled for
dhcpv6-stateful.

sysconf: IPV6_FORCE_ACCEPT_RA controls accept_ra sysctl.
eni: mode static and mode dhcp 'accept_ra' controls sysctl.

Add 'accept-ra: true|false' parameter to config v1 and
v2. When True: accept_ra is set to '1'. When False:
accept_ra is set to '0'. When not defined in config the
value is left to the operating system default.

This change also extend the IPv6 support to distinguish
between slaac and dhcpv6-stateless. SLAAC is autoconfig
without any options from DHCP, while stateless auto-configures
the address and the uses DHCP for other options.

LP: #1806014
LP: #1808647