summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-12-02lp-to-git-users: adding elafontaine (#74)Eric Lafontaine
Mapped from eric-lafontaine1
2019-12-02lp-to-git-users: adding xiaofengw-vmwareXiaofeng Wang
Mapped from xiaofengw
2019-11-27dmidecode: log result *after* stripping \nIgor Galić
This makes for a slightly prettier and less confusing log.
2019-11-26cloud_tests: add azure platform support to integration testsahosmanmsft
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.
2019-11-26set_passwords: support for FreeBSD (#46)Igor Galić
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 <chad.smith@canonical.com>
2019-11-25tools: migrate-lp-user-to-github removes repo_dir if created (#35)Chad Smith
To run: ./tools/migrate-lp-user-to-github LAUCHPAD_USERNAME GITHUB_USERNAME
2019-11-25Correct jumbled documentation for cc_set_hostname module (#64)do3meli
LP: #1853543
2019-11-25FreeBSD: fix for get_linux_distro() and lru_cache (#59)Igor Galić
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
2019-11-25lp-to-git-users: adding do3meliDominic Schlegel
Mapped from d-info-e
2019-11-22ec2: Add support for AWS IMDS v2 (session-oriented) (#55)Ryan Harper
* 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
2019-11-21tests: Fix cloudsigma tests when no dmidecode data is present. (#57)Scott Moser
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.
2019-11-20net: IPv6, accept_ra, slaac, stateless (#51)Harald
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
2019-11-20docs: Update the configdrive datasource links (#44)Joshua Powers
Update ConfigDrive datasource documentation to point to the most recent OpenStack documentation for ConfigDrive. LP: #1852461
2019-11-20lp-to-git-users: adding PengpengSunPengpeng Sun
Mapped from pengpengs
2019-11-20lp-to-git-users: adding trstringerThomas Stringer
Mapped from trstringer
2019-11-15lp-to-git-users: adding hjensasHarald Jensås
Mapped from harald-jensas
2019-11-13distro: correctly set usr_lib_exec path for FreeBSD distro (#40)Igor Galić
On FreeBSD our helpers live in /usr/local/lib/cloud-init/ LP: #1852491
2019-11-13azure: support secondary ipv6 addresses (#33)Chad Smith
Azure's Instance Metadata Service (IMDS) reports multiple IPv6 addresses, via the http://169.254.169.254/metadata/instance/network route. Any additional values after the first in 'ipAddresses' under the 'ipv6' interface key are extracted and configured as static IPs on the interface.
2019-11-13Fix metadata check when local-hostname is null (#32)Mark Goddard
Fix traceback when running with a config drive containing a metadata file which has local-hostname set to null. Cloud-init ignores absent local-hostname or None values. LP: #1852100
2019-11-13Merge pull request #38 from blackboxsw/cleanup/run-ci-on-pull-requestRyan Harper
travis: only run CI on pull requests
2019-11-13switch default FreeBSD salt minion pkg from py27 to py36Dominic Schlegel
2019-11-13lp-to-git-users: adding igalicIgor Galić
Mapped from i.galic
2019-11-12travis: only run CI on pull requestsChad Smith
2019-11-12add data-server dns entry as new metadata server detectionJoshua Hügli
2019-11-12lp-to-git-users: adding chrisglassChris Glass
Mapped from tribaal
2019-11-12lp-to-git-users: adding larsksLars Kellogg-Stedman
Mapped from larsks
2019-11-12Merge pull request #31 from raharper/fix/pycodestyle-tipChad Smith
pycodestyle: remove unused local variable
2019-11-10pycodestyle: remove unused local variableRyan Harper
2019-11-08reporting: Using a uuid to enforce uniqueness on the KVP keys.momousta
The KVPs currently being emitted to the .kvp_pool file can have duplicate keys which is wrong since these keys should be unique. The situation can occur if for example one azure function called twice or more and this function is reporting telemetry through the use of KVPs. Any KVP consumer can get confused by the duplicate keys and a race condition can and have occurred.
2019-11-08lp-to-git-users: adding parideParide Legovini
Mapped from legovini
2019-11-07lp-to-git-users: adding powersjJoshua Powers
Mapped from powersj
2019-11-07lp-to-git-users: adding blackboxswChad Smith
Mapped from chad.smith
2019-11-07lp-to-git-users: adding raharperRyan Harper
Mapped from raharper
2019-11-07docs: touchups in rtd intro and README.mdChad Smith
- rtd/index.rst: update sentence to read:   cloud-init will also parse and process any optional user data - rtd/topics/datasources/rbxcloud.rst: fix rst link names to build docs - README.md:   - update travis badge url to project home: github/canonical/cloud-init   - update page title to:     Cloud-init official project upstream as of 11/2019
2019-11-07doc: update launchpad git refs to githubRyan Harper
2019-11-07tools: migrate script needs to write tools/.lp-to-git-userChad Smith
Also fix commit message lint
2019-11-07github: drop pull-request template to prepare for migrationRyan Harper
2019-11-06tools: add migrate-lp-user-to-github script to link LP to githubChad Smith
To link a launchpad account name to your github account for licensing accountability each LP user should publish a merge proposal in launchpad with their LP account and a matching merge proposal in github using their github user. Cloud-init will track these usename maps in ./tools/.lp-to-git-user as JSON. Run ./tools/migrate-lp-user-to-github <LP_USERNAME> <GITHUB_USERNAME> to automatically create merge proposals in launchpad and your github account.
2019-11-06github: new basic project readmeChad Smith
See rendered content at https://github.com/blackboxsw/cloud-init/tree/github/readme
2019-11-05Release 19.3Chad Smith
Bump the version in cloudinit/version.py to be 19.3 and update ChangeLog. LP: #1851428
2019-11-04azure: support matching dhcp route-metrics for dual-stack ipv4 ipv6Chad Smith
Network v2 configuration for Azure will set both dhcp4 and dhcp6 to False by default. When IPv6 privateIpAddresses are present for an interface in Azure's Instance Metadata Service (IMDS), set dhcp6: True and provide a route-metric value that will match the corresponding dhcp4 route-metric. The route-metric value will increase by 100 for each additional interface present to ensure the primary interface has a route to IMDS. Also fix dhcp route-metric rendering for eni and sysconfig distros. LP: #1850308
2019-11-04configdrive: fix subplatform config-drive for /config-drive sourceDavid Kindred
When ConfigDrive discovers the source path /config-drive, subplatform is now reports 'config-drive' LP: #1849731
2019-10-31DataSourceSmartOS: reconfigure network on each bootMike Gerdts
In typical cases, SmartOS does not use DHCP for network configuration. As such, if the network configuration changes that is reflected in metadata and will be picked up during the next boot. LP: #1765801 Joyent: OS-6902 reconfigure network on each boot
2019-10-31Add config for ssh-key import and consuming user-dataPavel Zakharov
This patch enables control over SSH public-key import and discarding supplied user-data (both disabled by default). allow-userdata: false ssh: allow_public_ssh_keys: false This feature enables closed appliances to prevent customers from unintentionally breaking the appliance which were not designed for user interaction. The downstream change for this is here: https://github.com/delphix/cloud-init/pull/4
2019-10-31net: fix subnet_is_ipv6() for stateless|statefulHarald Jensås
Function return false for ipv6_dhcpv6-stateless|stateful, the eni renderer does not add '6' to 'inet' which is incorrect. The subnet_is_ipv6() function is updated to also return true if startswith('ipv6'). LP: #1848690
2019-10-31OVF: disable custom script execution by defaultXiaofeng Wang
For security concern, we disable the custom script by default.If a custom script is provided, stop customization unless the custom script is explicitly enabled by tools config.
2019-10-31cc_puppet: Implement csr_attributes.yaml supportMatthias Baur
This change adds two new parameters: * csr_attributes * csr_attributes_path Those parameters allow to configure the content of the csr_attributes.yaml file. See https://puppet.com/docs/puppet/latest/config_file_csr_attributes.html
2019-10-31cloud-init.service: on centos/fedora/redhat wait on NetworkManager.serviceRyan Harper
In Centos/RHEL 8, NetworkManager is installed as the networking service. cloud-init.service needs to run After this service to allow the OS to bring networking up first. LP: #1843334
2019-10-29azure: Do not lock user on instance id changeSam Eiderman
After initial boot ovf-env.xml is copied to agent dir (/var/lib/waagent/) with REDACTED password. On subsequent boots DataSourceAzure loads with a configuration where the user specified in /var/lib/waagent/ovf-env.xml is locked. If instance id changes, cc_users_groups action will lock the user. Fix this behavior by not locking the user if its password is REDACTED. LP: #1849677
2019-10-24net/netplan: use ipv6-mtu key for specifying ipv6 mtu valuesRyan Harper
netplan introduced an 'info' subcommand which emits yaml describing implemented features that indicate new or changed fields and values in the yaml that it accepts. Previously, cloud-init emitted the key 'mtu6' for ipv6 MTU values. This is not correct and netplan will fail to parse these values. Netplan as of 0.98 supports both the info subcommand and the ipv6-mtu key. This branch modifies the netplan renderer to collect the netplan info output into a 'features' property which is a list of available feature flags which the renderer can use to modify its output. If the command is not available, no feature flags are set and cloud-init will render IPv6 MTU values just as MTU for the subnet.