summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-01-22.readthedocs.yaml: install cloud-init when building docs (#181)Daniel Watkins
This should ensure that all its dependencies are installed during doc generation. LP: #1860450
2020-01-22Introduce an RTD config file, and pin the Sphinx version to the RTD default ↵Daniel Watkins
(#180) doc-requirements.txt: pin Sphinx at version used by RTD Introduce a configuration file containing our existing web-based configuration.
2020-01-21Drop most of the remaining use of six (#179)Daniel Watkins
2020-01-21Start removing dependency on six (#178)Daniel Watkins
* url_helper: drop six * url_helper: sort imports * log: drop six * log: sort imports * handlers/__init__: drop six * handlers/__init__: sort imports * user_data: drop six * user_data: sort imports * sources/__init__: drop six * sources/__init__: sort imports * DataSourceOVF: drop six * DataSourceOVF: sort imports * sources/helpers/openstack: drop six * sources/helpers/openstack: sort imports * mergers/m_str: drop six This also allowed simplification of the logic, as we will never encounter a non-string text type. * type_utils: drop six * mergers/m_dict: drop six * mergers/m_list: drop six * cmd/query: drop six * mergers/__init__: drop six * net/cmdline: drop six * reporting/handlers: drop six * reporting/handlers: sort imports
2020-01-20Add Rootbox & HyperOne to list of cloud in README (#176)Adam Dobrawy
2020-01-16docs: add proposed SRU testing procedure (#167)Chad Smith
Co-Authored-By: Daniel Watkins <daniel@daniel-watkins.co.uk>
2020-01-16util: rename get_architecture to get_dpkg_architecture (#173)Daniel Watkins
This makes it clearer that we should only use this in code paths that will definitely have dpkg available to them. - Rename get_architecture -> get_dpkg_architecture - Add docstring to get_dpkg_architecture
2020-01-16Ensure util.get_architecture() runs only once (#172)Ryan Harper
* Ensure util.get_architecture() runs only once util.get_architecture() recently was wrapped using python3's lru_cache() which will cache the result so we only invoke 'dpkg --print-architecture' once. In practice, cloud-init.log will show multiple invocations of the command. The source of this was that the debian Distro object implements the get_primary_arch() with this command, but it was not calling it from util, but issuing a util.subp() directly. This branch also updates cc_apt_configure methods to fetch the arch value from the distro class, and then ensure that the methods apt_configure calls pass the arch value around. * utils: remove lsb_release and get_architecture wrappers The original lsb_release wrapper was used to prevent polluting the single value we cached, however lru_cache() already handles this case by using args, kwargs values to cache different calls to the method. * rename_apt_list: use all positional parameters
2020-01-14Only use gpart if it is the BSD gpart (#131)Conrad Hoffmann
Currently, cloud-init will happily try to run `gpart` on Linux even though on most distributions this a different tool [1]. Extend the availability check to make sure the `gpart` present is really the BSD variant, to avoid accidental execution. Also add a pointer to the docs, so that people do not try to install gpart on Linux in the expectation it will work with this module. [1] https://github.com/baruch/gpart
2020-01-14freebsd: remove superflu exception mapping (#166)Gonéri Le Bouder
We often map exception when is not necessary. This commit clean up the FreeBSD distro file.
2020-01-10ssh_auth_key_fingerprints_disable test: fix capitalization (#165)Paride Legovini
Adapt the test to the new capitalization introduced in 8116493950e7c47af0ce66fc1bb5d799ce5e477a.
2020-01-09util: move uptime's else branch into its own boottime function (#53)Igor Galić
Also fix bugs: - pass binary instead of string to sysctlbyname(), and - unpack the "return value" in a struct, rather than in single integer. LP: #1853160 Co-Authored-By: Ryan Harper <ryan.harper@canonical.com>
2020-01-09workflows: add contributor license agreement checker (#155)Chad Smith
Check whether the pull request submitter has signed the CLA due to presence of github.actor in tools/.lp-to-git-user Set 'CLA signed' if present, 'CLA not signed' label if absent * grep for the full github username in CLA file Co-authored-by: Daniel Watkins <daniel@daniel-watkins.co.uk>
2020-01-08lp-to-git-users: adding OddBloke (#159)Daniel Watkins
Mapped from daniel-thewatkins
2020-01-08net: fix rendering of 'static6' in network config (#77)Ryan Harper
* net: fix rendering of 'static6' in network config A V1 static6 network typo was misrendered in eni, it's not valid. It was ignored in sysconfig and netplan. This branch fixes eni, updates sysconfig, netplan to render it correctly and adds unittests for all cases. Reported-by: Raphaël Enrici LP: #1850988 * net: add comment about static6 type in subnet_is_ipv6 Co-authored-by: Chad Smith <blackboxsw@gmail.com> Co-authored-by: Daniel Watkins <daniel@daniel-watkins.co.uk>
2020-01-08lp-to-git-users: adding otubo (#135)Eduardo Otubo
Mapped from otubo
2020-01-08Make tests work with Python 3.8 (#139)Conrad Hoffmann
* Make DistroChecker test work with Python 3.8 In Python 3.8, `platform.linux_distribution` has been removed. This was anticipated, and the cloud-init code uses its own `util.get_linux_distro` instead, which works fine w/o `platform.linux_distribution`. However, these tests still try to mock the platform function, which fails if it doesn't exist (Python 3.8). Instead, mock the new function here, as this is a test for code that depends on it rather than the function itself. * Make GetLinuxDistro tests work with Python 3.8 In Python 3.8, `platform.dist` was removed, so allow mock to create the function by setting `create=True`. * Make linter happy in Python 3.8 Suppress E1101(no-member) as this function was removed.
2020-01-07lp-to-git-users: adding rjschwei (#158)Robert Schweikert
Mapped from rjschwei
2020-01-07fixed minor bug with mkswap in cc_disk_setup.py (#143)andreaf74
2020-01-07lp-to-git-users: adding andreaf74 (#157)andreaf74
Mapped from afranceschini
2020-01-07freebsd: fix create_group() cmd (#146)Gonéri Le Bouder
The correct command to create a group if `pw group add foo`. In addition, this commit simplify a bit the logic: - simplify a block to avoid an extra level of indentation
2020-01-07lp-to-git-users: adding madhuri-rai07 (#156)Madhuri Kumari
Mapped from madhuri-rai07
2020-01-07lp-to-git-users: adding ask0n (#150)Anton
Mapped from askon
2020-01-06doc: make apt_update example consistent (#154)Daniel Watkins
Other options near it use the non-default value, so the inconsistency has lead to confusion for readers.
2020-01-06doc: add modules page toc with links (#153)Chad Smith
LP: #1852456
2020-01-06lp-to-git-users: adding karibou (#140)Louis Bouchard
Mapped from louis
2019-12-27lp-to-git-users: adding pa-yourserveradmin-com (#145)Andrew Poltavchenko
Mapped from andreipoltavchenko
2019-12-20Add support for the amazon variant in cloud.cfg.tmpl (#119)Frederick Lefebvre
2019-12-20ci: remove Python 2.7 from CI runs (#137)Daniel Watkins
Specifically, drop it from the default list of environments that tox will run, and from Travis. (We retain the configuration in tox.ini for now, for any remaining Python 2.7 needs.)
2019-12-20modules: drop cc_snap_config config module (#134)Chad Smith
cloud-init has moved to cc_snap module and a top-level config key 'snap'. cc_snap_config was deprecated in cloud-init version 18.2 Co-authored-by: Daniel Watkins <daniel@daniel-watkins.co.uk>
2019-12-20migrate-lp-user-to-github: ensure Launchpad repo exists (#136)Daniel Watkins
* migrate-lp-user-to-github: remove unused option * migrate-lp-user-to-github: ensure Launchpad repo exists * migrate-lp-user-to-github: typo fix
2019-12-20docs: add initial troubleshooting to FAQ (#104)Joshua Powers
docs: add initial troubleshooting to FAQ
2019-12-20doc: update cc_set_hostname frequency and descrip (#109)Joshua Powers
doc: update cc_set_hostname frequency and descrip After fixing LP: #1746455 the docs for cc_set_hostname were not updated to indicate the change in frequency or why. LP: #1827021
2019-12-20freebsd: introduce the freebsd renderer (#61)Gonéri Le Bouder
* freebsd: introduce the freebsd renderer Refactoring of the FreeBSD code base to provide a real network renderer for FreeBSD. Use the generic update_sysconfig_file() from rhel_util to handle the access to /etc/rc.conf. Interfaces are not automatically renamed by FreeBSD using the following configuration in /etc/rc.conf: ``` ifconfig_fxp0_name="eth0" ``` * freesd: use regex named groups Reduce the complexity of `get_interfaces_by_mac_on_freebsd()` with named groups. * freebsd: breaks up _write_network() in tree small functions - `_write_ifconfig_entries()` - `_write_route_entries()` - `_write_resolve_conf()` * extend find_fallback_nic() to support FreeBSD this uses `route -n show default` to find the default interface * freebsd: use dns keys from NetworkState class The NetworkState class (settings instance) exposes the DNS configuration in two keys: - `dns_nameservers` - `dns_searchdomains` On OpenStack, these keys are set when a global DNS server is set. The alternative is the `dns_nameservers` and `dns_search` keys from each subdomain. We continue to read those. * freebsd: properly target the /etc/resolv.conf file * freebsd: ignore 'service routing restart' ret code On FreeBSD 10, the restart of routing and dhclient is likely to fail because - routing: it cannot remove the loopback route, but it will still set up the default route as expected. - dhclient: it cannot stop the dhclient started by the netif service. In both case, the situation is ok, and we can proceed. * freebsd: handle case when metadata MAC local locally Handle the case where the metadata configuration comes with a MAC that does not exist locally. See: - https://github.com/canonical/cloud-init/pull/61/files/635ce14b3153934ba1041be48b7245062f21e960#r359600604 - https://github.com/canonical/cloud-init/pull/61/files/635ce14b3153934ba1041be48b7245062f21e960#r359600966 * freebsd: show up a warning if several subnet found The FreeBSD provider currently only allow one subnet per interface. * freebsd: honor the target parameter in _write_network * freebsd: log when a bad route is found * freebsd: pass _postcmds to start_services() * freebsd: updatercconf() is depercated Replace `updatercconf()` by `rhel_util.update_sysconfig_file()`. * freebsd: ensure gateway is ipv4 before using it With the legacy ENI format, an IPv6 gateway may be pushed. This instead of the expected IPv4. * freebsd: find_fallback_nic, support FB10 On FreeBSD <= 10, `ifconfig -l` ignores the down interfaces. * freebsd: use util.target_path() to load resolv.conf Ensure we access `/etc/resolv.conf`, not `etc/resolv.conf`. * freebsd: skip subnet without netmask Those are likely to be either invalid of in IPv6 format. IPv6 support will be addressed later in a new patchset. * freebsd: get_devicelist returns netif list Ensure `get_devicelist()` returns the list of known netif on FreeBSD. * replace rhel_util.update_sysconfig_file wrapper call, with a wrapper function * reverse if condition to remove an indent Co-authored-by: Igor Galić <me+github@igalic.co>
2019-12-19cc_snappy: remove deprecated module (#127)Daniel Watkins
* cc_snappy: remove deprecated module * cloud_tests: remove cc_snappy tests (and references) This module was deprecated in favor of cc_snap in cloud-init v.18.2
2019-12-19lp-to-git-users: adding goneri (#133)Gonéri Le Bouder
Mapped from goneri
2019-12-19HACKING.rst: clarify that everyone needs to do the LP->GH dance (#130)Daniel Watkins
The previous language suggested that only people who had signed the CLA previously needed to prove their GH identity, which is not the case.
2019-12-19freebsd: cloudinit service requires devd (#132)Gonéri Le Bouder
Depends on devd to be sure the NIC device drivers are loaded in time.
2019-12-18cloud-init: fix capitalisation of SSH (#126)Daniel Watkins
* cc_ssh: fix capitalisation of SSH * doc: fix capitalisation of SSH * cc_keys_to_console: fix capitalisation of SSH * ssh_util: fix capitalisation of SSH * DataSourceIBMCloud: fix capitalisation of SSH * DataSourceAzure: fix capitalisation of SSH * cs_utils: fix capitalisation of SSH * distros/__init__: fix capitalisation of SSH * cc_set_passwords: fix capitalisation of SSH * cc_ssh_import_id: fix capitalisation of SSH * cc_users_groups: fix capitalisation of SSH * cc_ssh_authkey_fingerprints: fix capitalisation of SSH
2019-12-18doc: update cc_ssh clarify host and auth keysJoshua Powers
* Add headers for Authorized and Host key sections, move the authorized section up as it is probably more relevant. LP: #1827021
2019-12-18ci: emit names of tests run in Travis (#120)Daniel Watkins
This makes it easier to debug differences in test behaviour between Travis and local developer environments.
2019-12-18Release 19.4Chad Smith
Bump the version in cloudinit/version.py to be 19.4 and update ChangeLog. LP: #1856761
2019-12-18rbxcloud: fix dsname in RbxCloudAdam Dobrawy
LP: #1855196
2019-12-18tests: Add tests for value of dsname in datasourcesAdam Dobrawy
2019-12-18apport: Add RbxCloud dsAdam Dobrawy
2019-12-18docs: Updating index of datasourcesAdam Dobrawy
- Added RbxCloud - Sorted alphabetically
2019-12-18docs: Fix anchor of datasource_rbxAdam Dobrawy
2019-12-18settings: Add RbxCloudAdam Dobrawy
2019-12-17doc: specify _ over - in cloud config modulesJoshua Powers
Start a design decision area in HACKING to capture highlevel decisions. First example is to capture the use of _ over - in cloud config modules. LP: #1293254
2019-12-17tools: Detect python to use via env in migrate-lp-user-to-githubAdam Dobrawy
Reduce incosistency and allow use virtualenv for launchpad packages.