summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-08-11Merge pull request #46 from zdc/T3735-sagittazdc
User-Data: T3735: Fixed "multi" nodes type search
2021-08-11User-Data: T3735: Fixed "multi" nodes type searchzsdc
Several nodes with "multi" type contain extra space character after the `multi:` mark, which prevents the `cc_vyos_userdata` module to detect their type properly. This commit changes the regex used for detecting such nodes to fix the problem.
2021-06-27Merge pull request #45 from UnicronNL/currentKim
T3653: Cloudinit subnet error if a cidr (/24) is used instead of a su…
2021-06-27T3653: Cloudinit subnet error if a cidr (/24) is used instead of a subnet ↵Kim Hagen
mask (255.255.255.0)
2021-06-11Merge pull request #42 from UnicronNL/currentzdc
VMware: T3601 - VMware: T3583
2021-06-09Add descrition for why the the ssh_keys variable is parsed.Kim Hagen
2021-06-07T3339: Cloud-Init domain search setting not applied.Kim Hagen
2021-06-06T3601: Error in ssh keys for vmware cloud-init if ssh keys is left empty.Kim Hagen
2021-06-01T3583: Overwrite default config ntp settings when custom ntp servers are ↵Kim Hagen
provided.
2021-04-03Merge pull request #40 from zdc/T3432-sagittazdc
Azure: T3432: Reverted changes for appending public-keys
2021-04-03Azure: T3432: Reverted changes for appending public-keyszsdc
This commit reverts the 5b47d9dc1cd80e3dbd0fb21125febab2e99d5f9c and 57e53d13ad772a74f55c38d95f6d61623fe08633 since Cloud-init 20.4 is not affected by the problem.
2021-03-29Merge pull request #39 from UnicronNL/currentKim
domain-name: T3446: Cloudinit error message when empty domain is pass…
2021-03-29domain-name: T3446: Cloudinit error message when empty domain is passed to ↵Kim Hagen
filter.
2021-03-29Merge pull request #37 from UnicronNL/currentKim
Metadata: T3432: Azure ssh keys not working for version 1.2.7/1.3.x u…
2021-03-29Metadata: T3432: Azure ssh keys not working for version 1.2.7/1.3.x updateKim Hagen
2021-03-25Merge pull request #34 from UnicronNL/currentKim
Metadata: T3432: Azure ssh keys not working for version 1.2.7/1.3.x
2021-03-25Metadata: T3432: Azure ssh keys not working for version 1.2.7/1.3.xKim Hagen
2021-02-15Merge pull request #33 from zdc/T2403-sagittazdc
MAC address: T2403: Added MAC processing to network-config
2021-02-15MAC address: T2403: Added MAC processing to network-configzsdc
In rare cases, udev scripts may try to rename ethernet interfaces at the first boot, including an interface used to configure the system. This leads to inconsistency between the config and actual interface names and sometimes to wrong interfaces (`renameX`). If we will configure the `hw-id` option via Cloud-init, this must guarantee that interface will have a proper (expected) config and name.
2021-02-14Merge pull request #32 from zdc/T2403-sagittazdc
network-config: T2403: Fixed missed network-config
2021-02-14network-config: T2403: Fixed missed network-configzsdc
The commit ceaa51c3df393d8bcfb8aa58e47d9d2eb7a9efb2 fixed receiving network-config for non-typical, "internal" datasources not addressed to be used normally, but broke this for normal ones. So, this is the third time when this part of the module must be changed to combine both methods: `cloud.datasource.network_config` for normal and `init_stage._find_networking_config()` for internal.
2021-01-08Debian: drop dh-systemd dependencyChristian Poessinger
dh-systemd was merged into debhelper in version 9.20160709 [1] and since stretch, dh-systemd is an empty transitional package. [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=822670
2021-01-01T2116: Enable write_files moduleKim Wittenburg
The `write_files` module allows to provides files to the system at deployment. This can be useful for situations when they are required to make a configuration valid, for example - security keys, certificates, etc.
2020-12-25Merge pull request #28 from zdc/T2117-equuleus-20.4zdc
T2117: Cloud-init updated to 20.4
2020-12-25T2117: Updates from 20.4 copied to resizefs_vyoszsdc
This commit does not change any actually used in VyOS logic. It only copies changes from the upstream 20.4 to stay closer to the upstream code.
2020-12-25T2117: Cloud-init updated to 20.4zsdc
Merged with 20.4 tag from the upstream Cloud-init repository
2020-12-25Merge pull request #27 from zdc/T2116-equuleuszdc
User-Data: T2116: Added module to apply config commands at deployment
2020-12-25User-Data: T2116: Added module to apply config commands at deploymentzsdc
With the new `cc_vyos_userdata.py` module is possible to set in User-Data (`#cloud-config`) new parameter `vyos_config_commands`. This parameter should be a list of VyOS configuration commands that will be applied during deployment. The module will run after the Meta-Data module `cc_vyos.py`. Commands requirements: - one command per line - if command ending by value, it must be inside single quotes: `set some option 'value'`, `delete some option 'value'` - a single-quote symbol is not allowed inside command or value The commands list produced by the `show configuration commands` command on a VyOS router should comply with all the requirements, so it is easy to get a proper commands list by copying it from another router. Usage example (User-Data content): ``` #cloud-config vyos_config_commands: - set system host-name 'demo123' - set system ntp server 1.pool.ntp.org - set system ntp server 2.pool.ntp.org - delete interfaces ethernet eth2 address - set interfaces ethernet eth2 address '192.0.2.1/24' ```
2020-11-24Release 20.4 (#686)20.4James Falcon
Bump the version in cloudinit/version.py to 20.4 and update ChangeLog. LP: #1905440
2020-11-24tox: avoid tox testenv subsvars for xenial support (#684)Chad Smith
Xenial tox 2.3.1 still suffers from https://github.com/tox-dev/tox/issues/208. As a result we cannot use testenv substvars if we want to support running tox on xenial systems. Drop the {[testenv:integration-tests]*} substitutions to avoid tracebacks when running `tox -e xenial-dev` which has the signature: "No support for the %s substitution type" % sub_type) tox.ConfigError: ConfigError: No support for the posargs substitution type
2020-11-23Ensure proper root permissions in integration tests (#664)James Falcon
Tests previously assumed that when executing commands and transferring files that user will have root permissions. This change updated integration testing infrastructure so that is true.
2020-11-23LXD VM support in integration tests (#678)James Falcon
2020-11-23Integration test for fallocate falling back to dd (#681)James Falcon
See #585
2020-11-23.travis.yml: correctly integration test the built .deb (#683)Daniel Watkins
`IMAGE_SOURCE` was renamed to `CLOUD_INIT_SOURCE` before the testing framework ever landed, but I did not mirror that change in .travis.yml before it landed. This addresses that.
2020-11-23Ability to hot-attach NICs to preprovisioned VMs before reprovisioning (#613)aswinrajamannar
Adds the ability to run the Azure preprovisioned VMs as NIC-less and then hot-attach them when assigned for reprovision. The NIC on the preprovisioned VM is hot-detached as soon as it reports ready and goes into wait for one or more interfaces to be hot-attached. Once they are attached, cloud-init gets the expected number of NICs (in case there are more than one) that will be attached from IMDS and waits until all of them are attached. After all the NICs are attached, reprovision proceeds as usual.
2020-11-20Support configuring SSH host certificates. (#660)Jonathan Lung
Existing config writes keys to /etc/ssh after deleting files matching a glob that includes certificate files. Since sshd looks for certificates in the same directory as the keys, a host certificate must be placed in this directory. This update enables the certificate's contents to be specified along with the keys. Co-authored-by: jonathan lung <lungj@heresjono.com> Co-authored-by: jonathan lung <jlung@kepler.space>
2020-11-20add integration test for LP: #1900837 (#679)Daniel Watkins
As the first test of this SRU cycle, this also introduces the sru_2020_11 mark to allow us to easily identify the set of tests generated for this SRU.
2020-11-19cc_resizefs on FreeBSD: Fix _can_skip_ufs_resize (#655)Mina Galić
On FreeBSD, if a UFS has trim: (-t) or MAC multilabel: (-l) flag, resize FS fail, because the _can_skip_ufs_resize check gets tripped up by the missing options. This was reported at FreeBSD Bugzilla: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250496 and as LP: #1901958 Rather than fixing the parser as in the patches proposed there (and attempted in #636) this pull-request rips out all of it, and simplifies the code. We now use `growfs -N` and check if that returns an error. If it returns the correct kind of error, we can skip the resize, because we either are at the correct size, or the filesystem in question is broken or not UFS. If it returns the wrong kind of error, we just re-raise it. LP: #1901958
2020-11-19DataSourceAzure: push dmesg log to KVP (#670)Anh Vo
Pushing dmesg log to KVP to help troubleshoot VM boot issues
2020-11-19Make mount in place for tests work (#667)James Falcon
IMAGE_SOURCE = 'IN_PLACE' wasn't working previously. Replaced LXD launch with an init, then mount, then start.
2020-11-19integration_tests: restore emission of settings to log (#657)Daniel Watkins
2020-11-18DataSourceAzure: update password for defuser if exists (#671)Anh Vo
cc_set_password will only update the password for the default user if cfg['password'] is set. The existing code of datasource Azure will fail to update the default user's password because it does not set that metadata. If the default user doesn't exist in the image, the current code works fine because the password is set during user create and not in cc_set_password
2020-11-18tox.ini: only select "ci" marked tests for CI runs (#677)Daniel Watkins
`-k` will select tests or marks whose names match. `-m` selects only tests which have the specified mark, so is more appropriate.
2020-11-18Azure helper: Increase Azure Endpoint HTTP retries (#619)Johnson Shi
Increase Azure Endpoint HTTP retries to handle occasional platform network blips. Introduce a common method http_with_retries in the azure.py helper, which will serve as the common HTTP request handler for all HTTP requests with the Azure endpoint. This method has builtin retries and reporting diagnostics logic.
2020-11-18DataSourceAzure: send failure signal on Azure datasource failure (#594)Johnson Shi
On systems where the Azure datasource is a viable platform for crawling metadata, cloud-init occasionally encounters fatal irrecoverable errors during the crawling of the Azure datasource. When this happens, cloud-init crashes, and Azure VM provisioning would fail. However, instead of failing immediately, the user will continue seeing provisioning for a long time until it times out with "OS Provisioning Timed Out" message. In these situations, cloud-init should report failure to the Azure datasource endpoint indicating provisioning failure. The user will immediately see provisioning terminate, giving them a much better failure experience instead of pointlessly waiting for OS provisioning timeout.
2020-11-18test_persistence: simplify VersionIsPoppedFromState (#674)Daniel Watkins
2020-11-18only run a subset of integration tests in CI (#672)Daniel Watkins
This introduces the "ci" mark, used to indicate a test which should run as part of our CI integration testing run and the integration-tests-ci tox environment, which runs only those tests. Travis has been adjusted to use this tox environment. (All current module tests have been marked with the "ci" mark, but the one bug test that we have has not.)
2020-11-18cli: add --system param to allow validating system user-data on a machine (#575)Chad Smith
Allow root user to validate the userdata provided to the launched machine using `cloud-init devel schema --system`
2020-11-17test_persistence: add VersionIsPoppedFromState test (#673)Daniel Watkins
2020-11-17introduce an upgrade framework and related testing (#659)Daniel Watkins
This commit does the following: * introduces the `cloudinit.persistence` module, containing `CloudInitPickleMixin` which provides lightweight versioning of objects' pickled representations (and associated testing) * introduces a basic upgrade testing framework (in `cloudinit.tests.test_upgrade`) which unpickles pickles from previous versions of cloud-init (stored in `tests/data/old_pickles`) and tests invariants that the current cloud-init codebase expects * uses the versioning framework to address an upgrade issue where `Distro.networking` could get into an unexpected state, and uses the upgrade testing framework to confirm that the issue is addressed