summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* build(deps): bump cryptography from 3.2 to 3.3.2dependabot/pip/cryptography-3.3.2dependabot[bot]2021-02-221-1/+1
| | | | | | | | Bumps [cryptography](https://github.com/pyca/cryptography) from 3.2 to 3.3.2. - [Release notes](https://github.com/pyca/cryptography/releases) - [Changelog](https://github.com/pyca/cryptography/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/3.2...3.3.2) Signed-off-by: dependabot[bot] <support@github.com>
* Azure: Support for VMs without ephemeral resource disks. (#800)Johnson Shi2021-02-224-35/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: * Only merge in default Azure cloud ephemeral disk configs during DataSourceAzure._get_data() if the ephemeral disk exists. * DataSourceAzure.address_ephemeral_resize() (which is invoked in DataSourceAzure.activate() should only set up the ephemeral disk if the disk exists. Azure VMs may or may not come with ephemeral resource disks depending on the VM SKU. For VM SKUs that come with ephemeral resource disks, the Azure platform guarantees that the ephemeral resource disk is attached to the VM before the VM is booted. For VM SKUs that do not come with ephemeral resource disks, cloud-init currently attempts to wait and set up a non-existent ephemeral resource disk, which wastes boot time. It also causes disk setup modules to fail (due to non-existent references to the ephemeral resource disk). udevadm settle is invoked by cloud-init very early in boot. udevadm settle is invoked very early, before DataSourceAzure's _get_data() and activate() methods. Within DataSourceAzure's _get_data() and activate() methods, the ephemeral resource disk path should exist if the VM SKU comes with an ephemeral resource disk. The ephemeral resource disk path should not exist if the VM SKU does not come with an ephemeral resource disk. LP: #1901011
* cc_keys_to_console: add option to disable key emission (#811)Michael Hudson-Doyle2021-02-224-0/+97
| | | | | | | | | | | Specifically: ssh: emit_keys_to_console: false We also port the cc_keys_to_console cloud tests to the new integration testing framework, and add a test for this new option. LP: #1915460
* integration_tests: introduce lxd_use_exec mark (#802)Daniel Watkins2021-02-225-1/+15
| | | | | | | | | | | | | | 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.
* azure: case-insensitive UUID to avoid new IID during kernel upgrade (#798)Chad Smith2021-02-195-9/+153
| | | | | | | | | | | | | | | | | | | | | | 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
* stale.yml: don't ask submitters to reopen PRs (#816)Daniel Watkins2021-02-181-1/+1
| | | | | 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.
* integration_tests: fix use of SSH agent within tox (#815)Daniel Watkins2021-02-181-2/+2
| | | | We need to allow the SSH_AUTH_SOCK environment variable through for paramiko to be able to find the agent.
* integration_tests: add UPGRADE CloudInitSource (#812)Daniel Watkins2021-02-183-0/+12
| | | | | 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.
* integration_tests: use unique MAC addresses for tests (#813)Daniel Watkins2021-02-186-8/+26
| | | | | | | | | | | 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.
* Update .gitignore (#814)James Falcon2021-02-181-0/+3
|
* Port apt cloud_tests to integration tests (#808)James Falcon2021-02-162-52/+291
|
* integration_tests: fix test_gh626 on LXD VMs (#809)Daniel Watkins2021-02-161-2/+6
| | | | | 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).
* Fix attempting to decode binary data in test_seed_random_data test (#806)James Falcon2021-02-161-2/+4
| | | | | | `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.
* Remove wait argument from tests with session_cloud calls (#805)James Falcon2021-02-092-2/+2
|
* Datasource for UpCloud (#743)Antti Myyrä2021-02-0811-1/+752
| | | | New datasource utilizing UpCloud metadata API, including relevant unit tests and documentation.
* test_gh668: fix failure on LXD VMs (#801)Daniel Watkins2021-02-051-1/+5
| | | | | | | | | | | | 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.
* openstack: read the dynamic metadata group vendor_data2.json (#777)Andrew Bogott2021-02-0510-49/+171
| | | | | | | 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
* includedir in suoders can be prefixed by "arroba" (#783)Jordi Massaguer Pla2021-01-292-1/+14
| | | | | | | | | | | | | | | | | | | | 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.
* Merge upstream/20.4.1 into masterDaniel Watkins2021-01-282-1/+4
|\ | | | | | | | | 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.
| * Release 20.4.120.4.1upstream/20.4.1Daniel Watkins2021-01-152-1/+4
| | | | | | | | | | | | | | Bump the version in cloudinit/version.py to 20.4.1 and update ChangeLog. LP: #1911680
| * Revert "ssh_util: handle non-default AuthorizedKeysFile config (#586)"Daniel Watkins2021-01-152-6/+6
| | | | | | | | This reverts commit b0e73814db4027dba0b7dc0282e295b7f653325c.
* | [VMware] change default max wait time to 15s (#774)xiaofengw-vmware2021-01-272-1/+10
| | | | | | | | | | | | | | | | 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.
* | Revert integration test associated with reverted #586 (#784)James Falcon2021-01-264-97/+0
| |
* | Add jordimassaguerpla as contributor (#787)Jordi Massaguer Pla2021-01-261-0/+1
| | | | | | Signed-off-by: Jordi Massaguer Pla <jmassaguerpla@suse.de>
* | Add Rick Harding to CLA signers (#792)Rick Harding2021-01-261-0/+1
| |
* | HACKING.rst: add clarifying note to LP CLA process section (#789)Daniel Watkins2021-01-261-0/+5
| | | | | | | | We've had some first time contributors still end up trying to submit via Launchpad: this commit underlines that this is not necessary.
* | Stop linting cloud_tests (#791)James Falcon2021-01-261-4/+3
| | | | | | | | | | 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.
* | cloud-tests: update cryptography requirement (#790)Joshua Powers2021-01-261-1/+1
| |
* | Remove 'remove-raise-on-failure' calls from integration_tests (#788)James Falcon2021-01-267-28/+18
| | | | | | | | | | 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
* | Use more cloud defaults in integration tests (#757)James Falcon2021-01-223-24/+2
| | | | | | | | Stop requiring compartment_id for OCI and project_id for GCE since they can now be inferred in pycloudlib.
* | Adding self to cla signers (#776)Andrew Bogott2021-01-211-0/+1
| |
* | doc: avoid two warnings (#781)Dan Kenigsberg2021-01-212-5/+10
| | | | | | | | | | | | | | | | | | | | 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>
* | Use proper spelling for Red Hat (#778)Dan Kenigsberg2021-01-205-10/+10
| | | | | | | | | | The company name has two distinct words. Signed-off-by: Dan Kenigsberg <danken@redhat.com>
* | Add antonyc to .github-cla-signers (#747)Anton Chaporgin2021-01-191-0/+1
| |
* | integration_tests: log image serial if available (#772)Daniel Watkins2021-01-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | 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/
* | Revert "ssh_util: handle non-default AuthorizedKeysFile config (#586)" (#775)Daniel Watkins2021-01-192-6/+6
| | | | | | This reverts commit b0e73814db4027dba0b7dc0282e295b7f653325c.
* | [VMware] Support cloudinit raw data feature (#691)xiaofengw-vmware2021-01-135-14/+468
| | | | | | 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.
* | net: Fix static routes to host in eni renderer (#668)Pavel Abalikhin2021-01-134-0/+47
| | | | | | | | Route '-net' parameter is incompatible with /32 IPv4 addresses so we have to use '-host' in that case.
* | .travis.yml: don't run cloud_tests in CI (#756)Daniel Watkins2021-01-131-80/+0
| | | | | | | | | | | | | | | | 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.
* | test_upgrade: add some missing commas (#769)Daniel Watkins2021-01-131-2/+2
| |
* | cc_seed_random: update documentation and fix integration test (#771)Daniel Watkins2021-01-132-5/+9
| | | | | | | | | | | | | | | | | | | | | | 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
* | Fix test gh-632 test to only run on NoCloud (#770)James Falcon2021-01-121-0/+3
| | | | | | LP: #1911230
* | archlinux: fix package upgrade command handling (#768)Bao Trinh2021-01-122-0/+3
| | | | | | | | | | | | | | 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>
* | integration_tests: add integration test for LP: #1910835 (#761)Daniel Watkins2021-01-122-0/+67
| |
* | Fix regression with handling of IMDS ssh keys (#760)Thomas Stringer2021-01-112-1/+11
| | | | | | | | | | | | | | | | | | 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.
* | integration_tests: log cloud-init version in SUT (#758)Daniel Watkins2021-01-081-1/+8
| |
* | Add ajmyyra as contributor (#742)Antti Myyrä2021-01-081-0/+1
| |
* | net_convert: add some missing help text (#755)Daniel Watkins2021-01-071-3/+6
| |
* | Missing IPV6_AUTOCONF=no to render sysconfig dhcp6 stateful on RHEL (#753)Eduardo Otubo2021-01-072-0/+2
| | | | | | | | | | | | | | | | 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>
* | doc: document missing IPv6 subnet types (#744)Antti Myyrä2021-01-071-2/+14
| | | | | | | | | | Added some missing IPv6 subnet configuration types (ipv6_dhcpv6-stateful, ipv6_dhcpv6-stateless, ipv6_slaac) to Networking config v1 documentation.