summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-02-22integration_tests: introduce lxd_use_exec mark (#802)Daniel Watkins
pycloudlib has modified the way LXD executes tests (https://github.com/canonical/pycloudlib/pull/114): it will always use SSH to access them by default, instead of using `lxc exec`. This behaviour is transparent for them majority of cloud-init's integration tests, but some currently depend on using `lxc exec` to access instances with (intentionally) broken networking: obviously these are not accessible via SSH. pycloudlib retains support for switching an instance to use `lxc exec`. This commit introduces the `lxd_use_exec` mark, which tests can use to indicate to the integration testing framework that they should be so switched, and applies it to all applicable tests.
2021-02-19azure: case-insensitive UUID to avoid new IID during kernel upgrade (#798)Chad Smith
Kernel's newer than 4.15 present /sys/dmi/id/product_uuid as a lowercase value. Previously UUID was uppercase. Azure datasource reads the product_uuid directly as their platform's instance-id. This presents a problem if a kernel is either upgraded or downgraded across the 4.15 kernel version boundary because the case of the UUID will change, resulting in cloud-init seeing a "new" instance id and re-running all modules. Re-running cc_ssh in cloud-init deletes and regenerates ssh_host keys on a system which can cause concern on long-running instances that somethingnefarious has happened. Also add: - An integration test for this for Azure Bionic Ubuntu FIPS upgrading from a FIPS kernel with uppercase UUID to a lowercase UUID in linux-azure - A new pytest.mark.sru_next to collect all integration tests related to our next SRU LP: #1835584
2021-02-18stale.yml: don't ask submitters to reopen PRs (#816)Daniel Watkins
Because they don't have the permissions to do it. Instead, reword the message to ask people to ping mitechie, in line with the rest of the message.
2021-02-18integration_tests: fix use of SSH agent within tox (#815)Daniel Watkins
We need to allow the SSH_AUTH_SOCK environment variable through for paramiko to be able to find the agent.
2021-02-18integration_tests: add UPGRADE CloudInitSource (#812)Daniel Watkins
This allows out-of-date images to be brought up-to-date with the archive, so that tests written against the latest cloud-init release will pass.
2021-02-18integration_tests: use unique MAC addresses for tests (#813)Daniel Watkins
Using the same MAC address results in strange test behaviour if more than one such instance is up: traffic gets routed to an arbitrary interface with the given MAC address. This can happen if running tests in parallel, or on a system which retains test instances from previous runs. The introduction of tests/integration_tests/__init__.py means that pylint now checks the integration tests: this commit also addresses those failures.
2021-02-18Update .gitignore (#814)James Falcon
2021-02-16Port apt cloud_tests to integration tests (#808)James Falcon
2021-02-16integration_tests: fix test_gh626 on LXD VMs (#809)Daniel Watkins
Without a MAC address match clause, the test network configuration is not applied to the primary interface in LXD VMs (which is named enp*s* rather than eth0).
2021-02-16Fix attempting to decode binary data in test_seed_random_data test (#806)James Falcon
`test_seed_random_data.py` was failing on openstack as openstack provides additional binary seed data to the end of the specified file. The test has been changed to only read the ascii porition of seed file.
2021-02-09Remove wait argument from tests with session_cloud calls (#805)James Falcon
2021-02-08Datasource for UpCloud (#743)Antti Myyrä
New datasource utilizing UpCloud metadata API, including relevant unit tests and documentation.
2021-02-05test_gh668: fix failure on LXD VMs (#801)Daniel Watkins
In LXD containers, the default interface is named eth0. In VMs, it isn't; it's renamed by systemd (likely to enp5s0, but we can't rely on that). This means that, on VMs, the network configuration we specify for "eth0" doesn't match an interface in the system and so is not applied. This modifies the test to set a MAC address in a match clause in the network configuration and on the eth0 interface (which is the LXD name in both containers and VMs pre-rename): this ensures that the specified configuration applies in both cases.
2021-02-05openstack: read the dynamic metadata group vendor_data2.json (#777)Andrew Bogott
Add support for openstack's dynamic vendor data, which appears under openstack/latest/vendor_data2.json This adds vendor_data2 to all pathways; it should be a no-op for non-OpenStack providers. LP: #1841104
2021-01-29includedir in suoders can be prefixed by "arroba" (#783)Jordi Massaguer Pla
Since version 1.9.1, @includedir can be used in the sudoers files instead of #includedir: https://github.com/sudo-project/sudo/releases/tag/SUDO_1_9_1 Actually "@includedir" is the modern syntax, and "#includedir" the historic syntax. It has been considered that "#includedir" was too puzzling because it started with a "#" that otherwise denotes comments. This happens to be the default in SUSE Linux enterprise sudoer package, so cloudinit should take this into account. Otherwise, cloudinit was adding an extra #includedir, which was resulting on the files under /etc/sudoers.d being included twice, one by @includedir from the SUSE package, one by the @includedir from cloudinit. The consequence of this, was that if you were defining an Cmnd_Alias inside any of those files, this was being defined twice and creating an error when using sudo.
2021-01-28Merge upstream/20.4.1 into masterDaniel Watkins
upstream/20.4.1 was used to release the 20.4.1 hotfix. Merging it into master reconciles that fork in history, and integrates both the 20.4.1 changelog and tag into our main history.
2021-01-27[VMware] change default max wait time to 15s (#774)xiaofengw-vmware
If cloud-init is enabled on VMware platform, cloud-init will wait until its configuration file is ready and currently the max wait is 90 seconds by default. With our test, this configuration file should be ready within 1 second, so change it to 15 seconds for better performance. Also update the documentation about how to change the default value in cloud-init configuration file.
2021-01-26Revert integration test associated with reverted #586 (#784)James Falcon
2021-01-26Add jordimassaguerpla as contributor (#787)Jordi Massaguer Pla
Signed-off-by: Jordi Massaguer Pla <jmassaguerpla@suse.de>
2021-01-26Add Rick Harding to CLA signers (#792)Rick Harding
2021-01-26HACKING.rst: add clarifying note to LP CLA process section (#789)Daniel Watkins
We've had some first time contributors still end up trying to submit via Launchpad: this commit underlines that this is not necessary.
2021-01-26Stop linting cloud_tests (#791)James Falcon
The tox pylint command was failing because of competing dependencies in the multiple requirements files. Given that we plan on no longer updating cloud_tests, we also no longer need to lint them.
2021-01-26cloud-tests: update cryptography requirement (#790)Joshua Powers
2021-01-26Remove 'remove-raise-on-failure' calls from integration_tests (#788)James Falcon
pycloudlib no longer raises exceptions when cloud-init fails to start, and the API has been updated accordingly. Changes have been made to integration tests accordingly
2021-01-22Use more cloud defaults in integration tests (#757)James Falcon
Stop requiring compartment_id for OCI and project_id for GCE since they can now be inferred in pycloudlib.
2021-01-21Adding self to cla signers (#776)Andrew Bogott
2021-01-21doc: avoid two warnings (#781)Dan Kenigsberg
Two shell code blocks are not marked as such, confusing rst to consider them as yaml. Be explicit about their syntax, and use $ prompt to match elsewhere in the docs. /home/travis/build/canonical/cloud-init/doc/rtd/topics/format.rst:28: WARNING: Could not lex literal_block as "yaml". Highlighting skipped. /home/travis/build/canonical/cloud-init/doc/rtd/topics/format.rst:52: WARNING: Could not lex literal_block as "yaml". Highlighting skipped. Signed-off-by: Dan Kenigsberg <danken@redhat.com>
2021-01-20Use proper spelling for Red Hat (#778)Dan Kenigsberg
The company name has two distinct words. Signed-off-by: Dan Kenigsberg <danken@redhat.com>
2021-01-19Add antonyc to .github-cla-signers (#747)Anton Chaporgin
2021-01-19integration_tests: log image serial if available (#772)Daniel Watkins
Ubuntu cloud images ship /etc/cloud/build.info which includes a line with the build serial used to identify the image: serial: 20210108 This is valuable information when verifying Ubuntu issues (to confirm that testing is happening against the expected image), but is also useful when debugging test failures: manifests of all packages in (the base) images can be found at http://cloud-images.ubuntu.com/
2021-01-19Revert "ssh_util: handle non-default AuthorizedKeysFile config (#586)" (#775)Daniel Watkins
This reverts commit b0e73814db4027dba0b7dc0282e295b7f653325c.
2021-01-15Release 20.4.1Daniel Watkins
Bump the version in cloudinit/version.py to 20.4.1 and update ChangeLog. LP: #1911680
2021-01-15Revert "ssh_util: handle non-default AuthorizedKeysFile config (#586)"Daniel Watkins
This reverts commit b0e73814db4027dba0b7dc0282e295b7f653325c.
2021-01-13[VMware] Support cloudinit raw data feature (#691)xiaofengw-vmware
This feature will modify VMware datasource to read from meta data and user data which are specified by VMware vSphere user. If meta data/user data are found in cloud-init configuration directory, datasource will parse the meta data/network and user data from the configuration file, otherwise it will continue to parse them from traditional customization configuration file as before. The supported meta data file is in json or yaml format.
2021-01-13net: Fix static routes to host in eni renderer (#668)Pavel Abalikhin
Route '-net' parameter is incompatible with /32 IPv4 addresses so we have to use '-host' in that case.
2021-01-13.travis.yml: don't run cloud_tests in CI (#756)Daniel Watkins
We have replicated their functionality in the new integration testing framework, and have seen that running for long enough to be confident in relying on it. cloud_tests are still used in cloud-init's nightly test runs: this is only modifying what we run in Travis.
2021-01-13test_upgrade: add some missing commas (#769)Daniel Watkins
2021-01-13cc_seed_random: update documentation and fix integration test (#771)Daniel Watkins
The documentation did not mention that the given data may not be the exact string written: the cloud's random data may be added to it. Additionally, the documentation of the command key was incorrect. test_seed_random_data was updated to check that the given data is a prefix of the written data, to match cloud-init's expected (and, now, documented) behaviour. LP: #1911227
2021-01-12Fix test gh-632 test to only run on NoCloud (#770)James Falcon
LP: #1911230
2021-01-12archlinux: fix package upgrade command handling (#768)Bao Trinh
pacman uses `-u` instead of `upgrade` to trigger a system upgrade, fix the command handling so this is properly accounted for. as is, the resulting command attempts to install a (non-existent) `upgrade` package Co-authored-by: Rick Harding <rharding@mitechie.com>
2021-01-12integration_tests: add integration test for LP: #1910835 (#761)Daniel Watkins
2021-01-11Fix regression with handling of IMDS ssh keys (#760)Thomas Stringer
With the changes for SSH public keys to be retrieved from IMDS as a first option, when a key is passed through not in the raw SSH public key format it causes an issue and the key is not added to the user's authorized_keys file. This PR will temporarily disable this behavior until a permanent fix is put in place.
2021-01-08integration_tests: log cloud-init version in SUT (#758)Daniel Watkins
2021-01-08Add ajmyyra as contributor (#742)Antti Myyrä
2021-01-07net_convert: add some missing help text (#755)Daniel Watkins
2021-01-07Missing IPV6_AUTOCONF=no to render sysconfig dhcp6 stateful on RHEL (#753)Eduardo Otubo
IPV6_AUTOCONF needs to be set to 'no' on RHEL so NetworkManager can properly acquire ipv6 address. rhbz: #1859695 Signed-off-by: Eduardo Otubo <otubo@redhat.com>
2021-01-07doc: document missing IPv6 subnet types (#744)Antti Myyrä
Added some missing IPv6 subnet configuration types (ipv6_dhcpv6-stateful, ipv6_dhcpv6-stateless, ipv6_slaac) to Networking config v1 documentation.
2021-01-07Add example configuration for datasource `AliYun` (#751)Xiaoyu Zhong
2021-01-06integration_tests: add SSH key selection settings (#754)Daniel Watkins
This introduces PUBLIC_SSH_KEY, to configure what public SSH key should be used to access systems under test, and KEYPAIR_NAME, to configure the name used in clouds for that SSH key (or the default SSH key, in PUBLIC_SSH_KEY's absence).
2021-01-06fix a typo in man page cloud-init.1 (#752)Amy Chen
1. fix a typo in cloud-init.1 2. add xiachen-rh as contributor