summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-06-18cloud_tests: add impish release definition (#927)Paride Legovini
2021-06-17docs: fix stale links rename master branch to main (#926)Chad Smith
Update doc references to 'main' default branch due to rename. Also some links have eroded: - for doc links directly to a line num link to a blob/<commit>/file/path#L10 instead of blob/<branch_name>. - pytest.param link to a specific version doc as latest has dropped the link
2021-06-17Fix DNS in NetworkState (SC-133) (#923)James Falcon
v1 network config currently has no concept of interface-specific DNS, which is required for certain renderers. To fix this, added an optional 'interface' key on the v1 nameserver definition. If specified, it makes the DNS settings specific to the interface. Otherwise, it will be defined as global DNS as it always has. Additionally, DNS for v2 wasn't being recognized correctly. For DNS defined on a particular interface, these settings now also go into the global DNS settings as they were intended.
2021-06-17tests: Add 'adhoc' mark for integration tests (#925)James Falcon
Also new jenkins tox definition
2021-06-17Fix the spelling of "DigitalOcean" (#924)Mark Mercado
The name "DigitalOcean" doesn't have a space in it; it's a single compound word written in Pascal case (upper camel case).
2021-06-16Small Doc Update for ReportEventStack and Test (#920)Mike Russell
- small document update for ReportEventStack explaining post_files parameter - small unit test for test_reporting demonstrating the close of an event with optional post_files list
2021-06-15Replace deprecated collections.Iterable with abc replacement (#922)James Falcon
LP: #1932048
2021-06-14testing: OCI availability domain is now required (SC-59) (#910)James Falcon
2021-06-14add DragonFlyBSD support (#904)Gonéri Le Bouder
- Mostly based on FreeBSD, the main exception is that `find_devs_with_on_freebsd` does not work. - Since we cannot get the CDROM or the partition labels, `find_devs_with_on_dragonflybsd()` has a more naive approach and returns all the block devices.
2021-06-10Use instance-data-sensitive.json in jinja templates (SC-117) (#917)James Falcon
instance-data.json redacts sensitive data for non-root users. Since user data is consumed as root, we should be consuming the non-redacted data instead. LP: #1931392
2021-06-10doc: Update NoCloud docs stating required files (#918)James Falcon
LP: #1931577
2021-06-03build-on-netbsd: don't pin a specific py3 version (#913)Gonéri Le Bouder
Reuse the FreeBSD logic to be able to switch between Python3 versions easily.
2021-06-02- Create the log file with 640 permissions (#858)Robert Schweikert
Security scanners are often simple minded and complain on arbitrary settings such as file permissions. For /var/log/* having world read is one of these cases.
2021-06-01Allow braces to appear in dhclient output (#911)eb3095
dhclient output that contains brackets for pxe variables will break the dhclient parsing regex line. This fix retains the current functionality while fixing this particular issue.
2021-05-27Docs: Replace all freenode references with libera (#912)James Falcon
2021-05-25openbsd/net: flush the route table on net restart (#908)Gonéri Le Bouder
Ensure we've got a clean environment before we restart the network. In some cases, the `sh /etc/netstart` is not enough to restart the network. A previous default route remains in the route table and as a result the network is broken. Also `sh /netstart` does not kill `dhclient`. The problen happens for instance with OVH OpenStack SBG3.
2021-05-25Add Rocky Linux support to cloud-init (#906)Louis Abel
Rocky Linux is a RHEL-compatible distribution so all changes that have been made should be trivial.
2021-05-21Add "esposem" as contributor (#907)Emanuele Giuseppe Esposito
2021-05-19Add integration test for #868 (#901)James Falcon
Ensure no Traceback when 'chef_license' is set
2021-05-18Added support for importing keys via primary/security mirror clauses (#882)Paul Goins
Presently, mirror keys cannot be associated with primary/security mirrors. Unfortunately, this prevents use of Landscape-managed package mirrors as the mirror key for the Landscape-hosted repository cannot be provided. This patch allows the same key-related fields usable on "sources" entries to be used on the "primary" and "security" entries as well. LP: #1925395
2021-05-14[examples] config-user-groups expire in the future (#902)Geert Stappers
Changed year 2012 into 2032
2021-05-14BSD: static network, set the mtu (#894)Gonéri Le Bouder
In the case of a static network, we now set the MTU according to the meta-data.
2021-05-14Add integration test for lp-1920939 (#891)James Falcon
In #856 we added the ability to use partprobe instead of blockdev for reading partitions. Test that partprobe succeeds where blockdev fails. Also add a mechanism to our integration tests to allow a callable to be called between `lxc init` and `lxc start`
2021-05-14Fix unit tests breaking from new httpretty version (#903)James Falcon
httpretty now logs all requests by default which gets mixed up with our logging tests. Also we were incorrectly setting a logging level to 'None', which now also causes issues with the new httpretty version. See https://github.com/gabrielfalcao/HTTPretty/pull/419
2021-05-13Allow user control over update events (#834)James Falcon
Control is currently limited to boot events, though this should allow us to more easily incorporate HOTPLUG support. Disabling 'instance-first-boot' is not supported as we apply networking config too early in boot to have processed userdata (along with the fact that this would be a pretty big foot-gun). The concept of update events on datasource has been split into supported update events and default update events. Defaults will be used if there is no user-defined update events, but user-defined events won't be supplied if they aren't supported. When applying the networking config, we now check to see if the event is supported by the datasource as well as if it is enabled. Configuration looks like: updates: network: when: ['boot']
2021-05-11Update test characters in substitution unit test (#893)James Falcon
In newer versions of python, when using urllib.parse, lines containing newline or tab characters now get sanitized. This caused a unit test to fail. See https://bugs.python.org/issue43882
2021-05-07cc_disk_setup.py: remove UDEVADM_CMD definition as not used (#886)dermotbradley
UDEVADM_CMD is defined but not actually used in cc_disk_setup.py so remove it. Also modify the comment at top of read_parttbl function to remove the reference to udevadm which implies it is used to scan the partition table.
2021-05-07Add AlmaLinux OS support (#872)Andrew Lukoshko
AlmaLinux OS is RHEL-compatible so all the changes needed are trivial.
2021-05-05Release 21.2 (#890)James Falcon
Bump the version in cloudinit/version.py to 21.2 and update ChangeLog. LP: #1927254
2021-05-05Add \r\n check for SSH keys in Azure (#889)James Falcon
See https://bugs.launchpad.net/cloud-init/+bug/1910835
2021-05-03Revert "Add support to resize rootfs if using LVM (#721)" (#887)Daniel Watkins
This reverts commit 74fa008bfcd3263eb691cc0b3f7a055b17569f8b. During pre-release testing, we discovered two issues with this commit. Firstly, there's a typo in the udevadm command that causes a TypeError for _all_ growpart executions. Secondly, the LVM resizing does not appear to successfully resize everything up to the LV, though some things do get resized. We certainly want this change, so we'll be happy to review and land it alongside an integration test which confirms that it is working as expected. LP: #1922742
2021-04-29Add Vultaire as contributor (#881)Paul Goins
2021-04-27Azure: adding support for consuming userdata from IMDS (#884)Anh Vo
2021-04-26test_upgrade: modify test_upgrade_package to run for more sources (#883)Daniel Watkins
This allows us to use it when validating packages from -proposed (and PPAs etc.).
2021-04-26Fix chef module run failure when chef_license is set (#868)Ben Hughes
Move chef_license from TPL_PATH_KEYS to TPL_KEYS as the chef license setting is not a path but must be added to the client config template. Fixes file or folder not found exception raised from ensure_dirs.
2021-04-26Azure: Retry net metadata during nic attach for non-timeout errs (#878)aswinrajamannar
When network interfaces are hot-attached to the VM, attempting to get network metadata might return 410 (or 500, 503 etc) because the info is not yet available. In those cases, we retry getting the metadata before giving up. The only case where we can move on to wait for more nic attach events is if the call times out despite retries, which means the interface is not likely a primary interface, and we should try for more nic attach events.
2021-04-26Azure: Retrieve username and hostname from IMDS (#865)Thomas Stringer
This change allows us to retrieve the username and hostname from IMDS instead of having to rely on the mounted OVF.
2021-04-23Azure: eject the provisioning iso before reporting ready (#861)Anh Vo
Due to hyper-v implementations, iso ejection is more efficient if performed from within the guest. The code will attempt to perform a best-effort ejection. Failure during ejection will not prevent reporting ready from happening. If iso ejection is successful, later iso ejection from the platform will be a no-op. In the event the iso ejection from the guest fails, iso ejection will still happen at the platform level.
2021-04-22Use `partprobe` to re-read partition table if available (#856)Nicolas Bock
The blkdev command is fragile re-reading partition tables if a partition is mounted. This change instead uses the partprobe if it is available. LP: #1920939
2021-04-19fix error on upgrade caused by new vendordata2 attributes (#869)James Falcon
In #777, we added 'vendordata2' and 'vendordata2_raw' attributes to the DataSource class, but didn't use the upgrade framework to deal with an unpickle after upgrade. This commit adds the necessary upgrade code. Additionally, added a smaller-scope upgrade test to our integration tests that will be run on every CI run so we catch these issues immediately in the future. LP: #1922739
2021-04-15add prefer_fqdn_over_hostname config option (#859)hamalq
the above option allows the user to control the behavior of a distro hostname selection if both short hostname and FQDN are supplied. If `prefer_fqdn_over_hostname` is true the FQDN will be selected as hostname; if false the hostname will be selected LP: #1921004
2021-04-15Emit dots on travis to avoid timeout (#867)James Falcon
The current method of running a background sleep until travis is finished is causing integration test runs to pass even when they should be failing. Instead, update the code to emit dots itself.
2021-04-14doc: Replace remaining references to user-scripts as a config module (#866)Ryan Harper
git-grep showed a few more locations where we refer to a "user-scripts" config module which is really cc_scripts_user module. Replace these references with slightly different language so as not to confuse future me when looking for "user-scripts" vs. "scripts-user"
2021-04-13azure: Removing ability to invoke walinuxagent (#799)Anh Vo
Invoking walinuxagent from within cloud-init is no longer supported/necessary
2021-04-13Add Vultr support (#827)David Dymko
This PR adds in support so that cloud-init can run on instances deployed on Vultr cloud. This was originally brought up in #628. Co-authored-by: Eric Benner <ebenner@vultr.com>
2021-04-12Fix unpickle for source paths missing run_dir (#863)lucasmoura
On the datasource class, we require the use of paths.run_dir to perform some operations. On older cloud-init version, the Paths class does not have the run_dir attribute. To fix that, we are now manually adding that attribute in the Paths object if doesn't exist in the unpickle operation. LP: #1899299
2021-04-09sysconfig: use BONDING_MODULE_OPTS on SUSE (#831)Jens Sandmann
Update sysconfig configuration to use BONDING_MODULES_OPTS instead of BONDING_OPTS when on a SUSE system. The sysconfig support requires use of BONDING_MODULE_OPTS whereas the initscript support that rhel uses requires BONDING_OPTS.
2021-04-07lp-to-git-users: adding B1Sandmann (#828)Jens Sandmann
2021-04-07bringup_static_routes: fix gateway check (#850)Petr Fedchenkov
When bringing up DHCP-provided static routes, we check for "0.0.0.0/0" to indicate an unspecified gateway. However, when parsing the static route in `parse_static_routes`, the gateway is never specified with a net length, so the "/0" will never happen. This change updates the gateway check to check only for "0.0.0.0".
2021-03-30add hamalq user (#860)hamalq