summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* update changelog (new upstream snapshot)ubuntu/lunarubuntu/develChad Smith2023-03-291-0/+7
|
* merge from upstream/main at 23.1-41-gd7bdba6fChad Smith2023-03-29183-1342/+1530
|\
| * tests: bump pycloudlib version (#2102)Alberto Contreras2023-03-291-1/+1
| |
| * schema: do not manipulate draft4 metaschema for jsonschema 2.6.0 (#2098)Chad Smith2023-03-293-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only set additionalProperties = False on draft4 schema definition in jsonschema 3.0 or greater because cloud-init globally registers its draft4 extensions as the primary validator for any draft4-based schemas in the same python process. This affects solutions such as subiquity and ubuntu-desktop-installer which invoke jsonschema.validate in the same process at runtime just after calling cloudinit.schema.get_jsonschema_validator. The resulting Tracebacks are seen as something like: jsonschema.exceptions.SchemaError: {'$ref': '#/definitions/ref_id'} is not valid under any of the given schema Background: cloud-init needs to extend draft4 schema to better validate and warn 'deprecated' properties in draft4-based cloud-init schema definitions. Our unittests also attempt to strictly validate any meta schema definitions for the cc_* config modules. To accomplish strict meta schema validation cloud-init makes a copy of the draft4 meta schema and adds an 'additionalProperties' = True to that schema to raise specific errors and catch typos in cc_ module schema definitions. Given that cloud-init at runtime extends and registers a draft4 schema validator, any external consumers of jsonschema.validate with draft4-base schemas are exposed to cloud-init's validator so let's limit our risk exposure. For python 2.6.0, we cannot specify make draft4 schema strict because any "$ref" keys are not yet resolved to their actual #/defintions/<id> values so the traceback above will always be generated in 'strict' mode for complex schemas. This does not affect jsonschema 3.0+ which appears to resolve schema $refs values before schema validation.
| * sources/azure/imds: don't count timeout errors as connection errors (#2074)Chris Patterson2023-03-293-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When fetching metadata in _check_if_nic_is_primary() the retry count is 300, but fails out after 10 connection errors. In some cases, fetching from IMDS may fail with read timeout for more than 10 attempts, far sooner than the desired 300. Keeping the existing max_connection_errors = 10 is fine so long as it is truly a connection error. These generally shouldn't occur when using the primary NIC. Always retry on timeout errors (up until desired limit) and count only connections errors against max_connection_errors. Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
| * Fix Python 3.12 unit test failures (#2099)James Falcon2023-03-272-19/+21
| |
| * integration tests: Refactor instance checking (#1989)James Falcon2023-03-2750-311/+460
| | | | | | | | | | | | Using individual release and platform marks to specify our test support matrix was leading to too many marks specifying different combinations of things. Rather, we can rely on the "skipif" mark to perform any needed release or platform checks.
| * ci: migrate remaining jobs from travis to gh (#2085)Alberto Contreras2023-03-272-43/+17
| |
| * missing ending quote in instancedata docs(#2094)Hong L2023-03-271-1/+1
| |
| * refactor: stop passing log instances to cc_* handlers (#2016)d1r3ct0r2023-03-27113-931/+795
| | | | | | | | Use the module level Log instances instead of passing log instances to the cc_* handlers
| * tests/vmware: fix test_no_data_access_method failure (#2092)Chris Patterson2023-03-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch is_vmware_platform to return False to avoid failure: ``` def test_no_data_access_method(self): ds = get_ds(self.tmp) ds.vmware_rpctool = None > ret = ds._get_data() tests/unittests/sources/test_vmware.py:104: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cloudinit/sources/DataSourceVMware.py:193: in _get_data if require_vmware_platform and not is_vmware_platform(): cloudinit/sources/DataSourceVMware.py:401: in is_vmware_platform system_type = dmi.read_dmi_data("system-product-name") cloudinit/dmi.py:180: in read_dmi_data return _call_dmidecode(key, dmidecode_path) cloudinit/dmi.py:130: in _call_dmidecode (result, _err) = subp.subp(cmd) E RuntimeError: called subp. set self.allowed_subp=True to allow E subp(['/usr/sbin/dmidecode', '--string', 'system-product-name']) tests/unittests/helpers.py:176: RuntimeError ``` Bypassing is_vmware_platform() avoids the dmi reads. Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
| * Don't change permissions of netrules target (#2076)James Falcon2023-03-233-4/+27
| | | | | | | | | | | | | | Set permissions if file doesn't exist. Leave them if it does. LP: #2011783 Co-authored-by: Chad Smith <chad.smith@canonical.com>
| * tests/sources: patch util.get_cmdline() for datasource tests (#2091)Chris Patterson2023-03-231-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Recent changes to override_ds_detect() triggers a call to get_cmdline(), which invokes subp.subp() for various container checks. This causes tests to fail when running a specific test module instead of the full set. This is because test_smartos.py on module load will trigger these calls and the lru_cache() will retain the results. So if the module does not load, the tests will fail. Patch util.get_cmdline() for all data source tests to avoid this behavior. Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
| * macs: ignore duplicate MAC for devs with driver driver qmi_wwan (#2090)Chad Smith2023-03-232-13/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | Another physical modem which has duplicate MAC addresses. Cloud-init needs to ignore the subordinate devices which are associated with the qmi_wwan driver. Fixes network rendering for the following modems: Quectel EG25 Quectel RM510Q-GLHA Sierra Wireless MC7455 LP: #2008888
| * Fedora: Enable CA handling (#2086)František Zatloukal2023-03-221-0/+8
| | | | | | | | | | Fedora wasn't previously supported for CA handling. Enabling this allows the testsuite to pass when ran on a Fedora system. The conf override is the same as for rhel.
| * Add frantisekz as contributor (#2087)František Zatloukal2023-03-221-0/+1
| |
| * Send dhcp-client-identifier for InfiniBand ports (#2043)Waleed Mousa2023-03-224-5/+127
| | | | | | | | | | | | | | | | | | Sending dhclient command failed for InfiniBand ports because dhcp-client-identifier is not specified. So, providing this patch to allow send dhcp-client-identifier hardware with the dhclient command for InfiniBand ports. Signed-off-by: waleedm <waleedm@nvidia.com>
* | releasing cloud-init version 23.1.1-0ubuntu223.1.1-0ubuntu2Chad Smith2023-03-211-2/+2
| |
* | update changelog (new upstream snapshot)Chad Smith2023-03-211-0/+2
| |
* | merge from upstream/main at 23.1-27-g85b2fbc2Chad Smith2023-03-2191-835/+1170
|\ \ | |/
| * cc_ansible: complete the examples and doc (#2082)Yves2023-03-212-0/+2
| | | | | | | | | | Complete the examples that the suggested code work. The examples in this script are not correct and should be adjusted accordingly.
| * contributor: add bdrungChad Smith2023-03-201-0/+1
| | | | | | | | This contributor was added on a downstream ubuntu/devel branch and should be reflected in main too
| * bddeb: for dev package, derive debhelper-compat from host systemChad Smith2023-03-204-110/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running `make deb` or `packages/bddeb` our script uses the host's debuild tooling instead of sbuild. Since we move CI runners to a jammy environment, the host's debhelper-compat levels become incompatible with building a local bionic deb with debuild. Fix package-build .github/workflow/integration.yaml to install all package build dependenies from both requirements.txt an test-requirements.txt using read-depenedencies. Fix bddeb to determine the hosts debhelper-compat level support when generating local deb packages without using sbuild. To migrate to host-based debhelper-compat support the following changes were made: - drop packages/debian/compat file and prefer debian/control debhelper-compat (= ##) definitions - dpkg-query debhelper to check applicable debhelper versions in Provides on the host - Hardcode any `bddeb -d bionic` to a maximum of debhelper-compat( = 11) - Update package/debian/rules with latest published rules file from ubuntu/devel branch Use the latest debhelper-compat level provided by the host's debhelper package by using dpkg-query. Fixes CI on downstream ubuntu/* branches which invoke bddeb directly.
| * apport: only prompt for cloud_name when instance-data.json is absentChad Smith2023-03-202-13/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not prompt for CloudName when instance-data.json exists and is valid YAML. When instance-data.json exists, general-hooks/cloud_init.py will add the following fields to bug reports: CloudName, CloudID, CloudPlatform and CloudSubplatform. Downstream ubuntu packaging braches deliver: debian/apport-general-hook.py to /usr/share/apport/general-hooks/cloud-init.py Only prompt in during apport bug when the general-hook can't process instance-data.json.
| * datasource: Optimize datasource detection, fix bugs (#2060)Brett Holman2023-03-1918-148/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit d1ffbea556a06105 enabled skipping python datasource detection on OpenStack when no other datasources (besides DataSourceNone) can be discovered. This allowed one to override detection, which is a requirement for OpenStack Ironic which does not advertise itself to cloud-init. Since no further datasources can be detected at this stage in the code, this pattern can be generalized to other datasources to facilitate troubleshooting or providing a general workaround to runtime detection bugs. Additionally, this pattern can be extended to kernel commandline datasource definition. Since kernel commandline is highest priority of the configurations, it makes sense to override python code datasource detection as well. Include an integration test on LXD for this behavior that configures kernel commandline and reboots to verify that the specified datasource is forced.
| * Handle non existent ca-cert-config situation (#2073)Shreenidhi Shedi2023-03-162-6/+25
| | | | | | | | | | | | | | | | | | Currently if a cert file doesn't exist, cc_ca_certs module crashes This fix makes it possible to handle it gracefully. Also, out_lines variable may not be available if os.stat returns 0. This issue is also taken care of. Added tests for the same.
| * sources/azure: add networking check for all source PPS (#2061)Chris Patterson2023-03-162-12/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a networking check in _poll_imds() which will attempt DHCP again if networking is not up for source PPS. With the previous change to wait at least 20 minutes during provisioning for DHCP, this additional round is not necessary. Report failure if networking is not up for any mode of source PPS. In practice, this is very unlikely as provisioning will typically timeout within the 20 minute window the VM is attempting DHCP and the source PPS VM will be deleted. This fixes an (unobserved) issue where Savable PPS does not have networking prior to _wait_for_all_nics_ready(). Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
| * do not attempt dns resolution on ip addresses (#2040)Brett Holman2023-03-144-15/+35
| |
| * chore: fix style tip (#2071)Alberto Contreras2023-03-1426-55/+59
| | | | | | | | - remove too broad exceptions - ignore dynamic base types in templater
| * Fix metadata IP in instancedata.rst (#2063)Brian Haley2023-03-102-1/+2
| |
| * util: Pass deprecation schedule in deprecate_call() (#2064)Brett Holman2023-03-101-0/+1
| |
| * config: Update grub-dpkg docs (#2058)Brett Holman2023-03-103-6/+6
| | | | | | Co-authored-by: s-makin <sally.makin@canonical.com>
| * docs: Cosmetic improvements and styling (#2057)s-makin2023-03-062-5/+285
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the docs look more like the documentation produced on Ubuntu.com. Make the default font size larger for accessibility. Code literals are now the same size as regular font for the same reason, but made slightly bolded to help pick them out from text (which should help e.g. when commands are included as inline text and not a code block. Give the sidebar headings a higher weight, for easier navigation. For accessibility, change the weight and spacing between topics in the side bars to help separate them and make it easier to tell where one link ends and the next begins.
| * cc_grub_dpkg: Added UEFI support (#2029)Alexander Birkner2023-03-063-49/+150
| | | | | | | | | | | | | | | | On Debian and Ubuntu based systems the cc_grub_dpkg module handles the needed change of the disk device name / path between the pre created image and the real hardware system. Currently it seems only BIOS mode is supported. This adds UEFI support as well to change the configuration keys for UEFI.
| * tests: Write to /var/spool/rsyslog to adhere to apparmor profile (#2059)Chad Smith2023-03-051-2/+4
| | | | | | | | | | AppArmor is active on 23.04. It prevents writing to /var/tmp. Integration test now writes to /var/spool/rsyslog/cloudinit.log to assert working config.
| * oracle-ds: prefer system_cfg over ds network config source (#1998)Alberto Contreras2023-03-043-1/+49
| | | | | | | | | | | | | | | | | | | | | | Bump system_cfg over ds network_config_source for Oracle DS, so that if network config is defined under /etc/cloud, it will be honored. In a previous change, we moved the initramfs and system_cfg bellow ds to favor ds, but this implied system-wide configs were always not honored. LP: #1956788
| * Remove dead code (#2038)Brett Holman2023-03-0333-412/+7
| |
* | update changelogChad Smith2023-03-201-0/+2
| |
* | add bdrung as contributorChad Smith2023-03-201-0/+1
| |
* | Add Apport general hookBenjamin Drung2023-03-202-0/+100
| | | | | | | | | | | | | | | | | | Apport 2.25.0-0ubuntu1 removed the buggy `add_cloud_info` from the ubuntu general hook. Add an Apport general hook that reads `/run/cloud-init/instance-data.json` if present. LP: #1724623 Thanks for the initial version: John Chittum
* | update changelogChad Smith2023-03-081-0/+2
| |
* | d/postinst: prefer yaml.safe_load. yaml.load requires Loader paramChad Smith2023-03-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | It's been deprecated for a while, Ubuntu 23.04 sync'd 6.0.1 which dropped support for an optional Loader parameter making it required. This broke dpkg-reconfigured cloud-init on MAAS Ubuntu 23.04 system deployments which now exit non-zero due to changed yaml.load call-signature. LP: #2009746
* | update changelogAlberto Contreras2023-03-041-0/+8
| |
* | d/cloud-init.preinst: Oracle to remove network disabling config fileAlberto Contreras2023-03-041-0/+9
| | | | | | | | | | | | | | Oracle to remove vestigial /etc/cloud.cloud.cfg.d/99-disable-network-config.cfg because system config is now honored before datasource config LP: #1956788
* | releasing cloud-init version 23.1-0ubuntu323.1.1-0ubuntu1James Falcon2023-03-021-2/+2
| |
* | update changelog (new upstream snapshot)James Falcon2023-03-021-0/+6
| |
* | merge from main at 23.1-10-g4896402bJames Falcon2023-03-022-1/+6
|\ \ | |/
| * Release 23.1.1 (#2052)James Falcon2023-03-022-1/+6
| | | | | | | | Bump the version in cloudinit/version.py to 23.1.1 and update ChangeLog.
* | releasing cloud-init version 23.1-0ubuntu2James Falcon2023-03-021-2/+2
| |
* | update changelog (new upstream snapshot)James Falcon2023-03-021-0/+7
| |