summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* Add 'peers' and 'allow' directives in cc_ntp (#3124)Jacob Salmela2023-05-171-0/+1
| | | Signed-off-by: Jacob Salmela <jacob.salmela@hpe.com>
* Fix KeyError in iproute pformat (#3287)Dmitry Zykov2023-05-121-0/+1
| | | | | This fixes KeyError on specific network configuration when running cloud-init on "network" stage. The same problem was mentioned in #746 and #1041.
* resolv_conf: Allow > 3 nameservers (#2152)Major Hayden2023-05-091-0/+1
| | | | | | | Systems running systemd-resolved or dnsmasq can utlize more than three namervers. Older systems will just use the first three and ignore the rest. Signed-off-by: Major Hayden <major@redhat.com>
* setup.py: use pkg-config for udev/rules path (#2137)dankm2023-04-281-0/+1
| | | | | Distributions other than RHEL also use /usr/lib/udev for the rules path. Instead of hardcoding the udev rules path for RedHat, check pkg-config for the proper location.
* Update .github-cla-signers (#2126)Rob Tongue2023-04-171-0/+1
|
* Fix NoCloud kernel commandline semi-colon argsBrett Holman2023-04-101-0/+3
| | | | | | | | Truncate any trailing semi-colon delimited kernel commandline parameters when trying to match the designated datasource from /proc/cmdline. This was broken in 612b4de892d on systemd systems. Add an integration test for this codepath.
* run-container: make the container/VM timeout configurable (#2118)Paride Legovini2023-04-101-4/+6
| | | | | | 30 seconds are sometimes not enough when waiting for a VM to be ready. Make the timeout configurable via the command line. Rename the variable from DEFAULT_MAX_WAIT to MAX_WAIT as that is now configurable, and not a default anymore.
* Add "licebmi" as contributor (#2113)Mark Martinez2023-04-061-0/+1
|
* rhel: make sure previous-hostname file ends with a new line (#2108)Ani Sinha2023-04-041-0/+1
| | | | | | | | | cloud-init strips new line from "/etc/hostname" on rhel distro when processing "/var/lib/cloud/data/previous-hostname". Although this does not pose a serious issue, it is still better if the behavior is similar to other distros like Ubuntu where /previous-hostname does end with a new line. Fix this issue by using hostname parser in rhel similar to debian. Signed-off-by: Ani Sinha <anisinha@redhat.com>
* Adding contributors for DataSourceAkamai (#2110)acourdavAkamai2023-04-031-0/+3
| | | | | | I signed the Canonical CLA on behalf of Akamai; this change adds myself and two ICs from Akamai who are associated with my organization to the github-cli-signers file to allow them to contribute on the organization's behalf.
* Standardize kernel commandline user interface (#2093)Brett Holman2023-03-311-3/+1
| | | | | | - deprecate ci.ds= and ci.datasource= in favor of ds= - enable semi-colon-delimited datasource everywhere - add support for case-insensitive datasource match - add integration tests
* Add frantisekz as contributor (#2087)František Zatloukal2023-03-221-0/+1
|
* Send dhcp-client-identifier for InfiniBand ports (#2043)Waleed Mousa2023-03-221-0/+1
| | | | | | | | | 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>
* cc_ansible: complete the examples and doc (#2082)Yves2023-03-211-0/+1
| | | | | 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
* Fix metadata IP in instancedata.rst (#2063)Brian Haley2023-03-101-0/+1
|
* source: Force OpenStack when it is only option (#2045)Brett Holman2023-03-021-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running on OpenStack Ironic was broken in 1efa8a0a0, which prevented a system configured to run on only Openstack from actually running this ds. This change also prevents the kernel commandline definition from working. This change was required to prevent unnecessarily probing OpenStack on Ec2, and is therefore still required. This commit reverts an earlier attempt[1][2] to automatically detect OpenStack, due to regression it caused. Additionally, this change allows a system that defines a datasource list containing only [OpenStack] or [OpenStack, None] to attempt running on OpenStack, overriding ds_detect(). A datasource list that defines [OpenStack, None] still falls back to DataSourceNone if OpenStack fails to reach the IMDS. This change also lays groundwork for the following future work: 1. Add support for other datasources 2. Also override datasource checking when the kernel command line defines a datasource. This work needs to be done manually to support non-systemd systems. Besides forcing OpenStack to run when it is the only datasource in the datasource list, this commit also: [1] 0220295 (it breaks some use cases) [2] 29faf66 (no longer used) LP: #2008727
* dhclient_hook: remove vestigal dhclient_hook command (#2015)Brett Holman2023-02-283-82/+0
| | | | | | | | | At inception[1], dhclient hooks were used to filter environment variables into /run/cloud-init/dhclient.hooks/<interface>.json which was consumed by WALinuxAgentShim. The fallback method was to parse the dhcp client lease file. Today the Azure datasource directly uses the parsed lease file[2], and loading /run/cloud-init/dhclient.hook/<interface>.json file was removed in 22.2[3]. With no other consumers, we can remove this. [1] https://github.com/canonical/cloud-init/commit/648dbbf6b090c81e989f1ab70bf99f4de16a6a70 [2] https://github.com/canonical/cloud-init/blob/main/cloudinit/sources/DataSourceAzure.py#L447 [3] https://github.com/canonical/cloud-init/commit/5ad0768a796bc07232476d0d29b5225f1e6e131c
* Set ownership for new folders in Write Files Module (#1980)Jack2023-02-211-0/+1
| | | | | | | The parent directory would be created automatically if it does not exist. But the ownership of newly-created parent directory would always be root. With this change, it would be set the same as `owner`. LP: #1990513
* add OpenCloudOS and TencentOS support (#1964)wynnfeng2023-02-182-0/+3
|
* Recognize opensuse-microos, dev tooling fixesRobert Schweikert2023-02-162-102/+157
| | | | | | | | | | | | Update the distro selection code to recognize opensuse-microos as a SUSE based distribution. Also in this commit: * unittest mock OpenNebula of pwd.getpwnam to avoid test leaks on SuSE * tooling fixes to build and test opensuse - read-dependencies fix jinja2 and PyYAML pkg aliases for opensuse - Consolidate package operations based on OS family instead of distro flavor to cut down on duplication of command definitions. - format read-dependencies and run-container with black
* ci: sort and add checks for cla signers fileStefan Prietl2023-02-092-2/+16
| | | | | | | This sorts the CLA signers file and adds a convenience script for users to check and sort the file. A workflow job - which uses the script - makes sure that the file does not get merged in an unsorted state.
* Add "ederst" as contributor (#2010)Stefan Prietl2023-02-091-0/+1
|
* Fix OpenStack datasource detection on bare metal (#1923)Alexander Birkner2023-02-071-0/+7
| | | LP: #1815990
* Fix permission of SSH host keys (#1971)Ron Gebauer2023-01-251-0/+1
| | | | | | | | | If the host-keys are provided the private key permissions have 0600 which is indeed correct. But the public key has 0600 which should instead be 0644. With this change the public key is always 0644 and the private key is 0600 if provided or 640 if generated (to match sshd-keygen functionality).
* distros/rhel.py: _read_hostname() missing strip on "hostname" (#1941)Mark Mielke2023-01-181-0/+1
| | | | | | | | Debugging a related issue, I found that the determination of the "previous-hostname" was wrong on RHEL-based distributions. The fix is to add a call to strip on the result of the call to command "hostname" the same way the strip is done on the file containing the "previous-hostname".
* add "CalvoM" as contributor (#1955)d1r3ct0r2023-01-121-0/+1
|
* network/netplan: add gateways as on-link when necessary (#1931)Louis Sautier2023-01-091-0/+1
| | | | | | | | network/netplan: add gateways as on-link when necessary When the gateway isn't part of the subnet's network, the "on-link" flag is required for the route to get added. LP: #2000596
* tools: read-version drop extra call to git describe --longChad Smith2022-12-151-1/+0
|
* read-version: When insufficient tags, use cloudinit.version.get_versionChad Smith2022-12-151-1/+10
|
* feat: add support aliyun metadata security harden mode (#1865)Manasseh Zhou2022-11-301-0/+1
| | | | | | | Currently, Alibaba cloud provides a security hardening mode for its metadata server, which is alike IMDSv2, and we should support it. Detailed information be found here: https://www.alibabacloud.com/help/en/elastic-compute-service/latest/view-instance-metadata#concept-dwj-y1x-wgb
* Add support for static IPv6 addresses for FreeBSD (#1839)einsibjarni2022-11-251-0/+1
| | | Currently, FreeBSD ignores IPv6 addresses. This PR adds support for static IPv6 addresses
* Update read-versionJames Falcon2022-11-211-33/+21
| | | | | | | | | | | Use 'git describe <branch>' as the version number, even if the version differs from what is in version.py. This means that if the most recent commit is a tag, we'll get the tag number, otherwise we'll also show the number of commits since the last tag on the branch. Fix setup.py to align with PEP 440 versioning replacing trailing hyphen beyond major.minor.patch-g<HASH> with a "+". Additionally, did some cleanup and typing fixes on the script.
* Add "nkukard" as contributor (#1864)Nigel Kukard2022-11-211-0/+1
|
* Add Support for IPv6 metadata to OpenStack (#1805)Marvin Vogt2022-11-171-0/+1
| | | | | | | | | - Add openstack IPv6 metadata url fe80::a9fe:a9fe - Enable requesting multiple metadata sources in parallel This PR is very similar to #1160, reusing the provided `url_heper` logic. LP: #1906849
* add xiaoge1001 to .github-cla-signers (#1854)sxt10012022-11-171-0/+1
|
* VMware: Move Guest Customization transport from OVF to VMware (#1573)PengpengSun2022-11-161-3/+6
| | | | | | | | | | | | | | | | | | | | | | | This change is moving VMware Guest Customization data transport to VMware datasource, the goal is to have a single datasource for VMware which is named DatasourceVMware. Besides Guest Customization data transport(by local file), VMware datasource already has other data transports, like Guestinfo Keys and environment arguments. The detailed changes are: 1. Remove Guest Customization data transport from OVF datasource. 2. Refactor Guest Customization data transport code and add them to VMware datasource, For backward compatibility, Guest Customization data transport is put ahead of the other existing data transport since OVF is ahead of VMware in datasource searching list. 3. Add instance-id support in customization configuration file, so that instance-id can be given from vSphere side, if instance-id is not given, this datasource will read it from the file /sys/class/dmi/id/product_uuid no matter what transport is. 4. Move Guest Customization detection from dscheck_OVF() to dscheck_VMmare() in ds_identify script, Guest Customization detection is ahead of the other existing data transports since OVF is ahead of VMware in datasource searching list. 5. Modify unittests according to above changes. 6. Modify both OVF and VMware datasource documents according to above changes. 7. Guestinfo OVF data transport is left to OVF datasource since it uses OVF which is same with iso9660 transport.
* ci: run json tool on 22.04 rather than 20.04 (#1823)Brett Holman2022-11-101-5/+4
|
* Auto-format schema (#1810)Brett Holman2022-11-101-0/+12
| | | Add schema auto-format to tox and a CI test
* add mariner support (#1780)Minghe Ren2022-11-072-0/+2
|
* adding itjamie to .github-cla-signersJamie (Bear) Murphy2022-11-051-0/+1
|
* Update .github-cla-signers (#1811)Guillaume Gay2022-11-031-0/+1
|
* add NWCS datasource (#1793)shell-skrimp2022-10-262-2/+7
| | | | I am writing a cloud platform (nwcs) and need to add support to cloud-init.
* Adding myself as CLA signer (#1799)s-makin2022-10-261-0/+1
|
* apport: fix some data collection failures due to symlinks (#1797)Dan Bungert2022-10-251-0/+1
| | | | Apport screens out symlinks, so we should send realpath() normalized paths instead.
* read-version: Make it compatible with bionic (#1795)Alberto Contreras2022-10-251-1/+3
| | | | `git branch --show-current` option flag is only available in focal+. Use `git rev-parse --abbrev-ref HEAD` instead.
* Add my username (Jehops) to .github-cla-signers (#1784)Joseph Mingrone2022-10-141-0/+1
|
* docs: Correct typo in the FAQ (#1774)Maximilian Wörner2022-10-051-0/+1
|
* support dhcp{4,6}-overrides in networkd renderer (#1710)Aidan Obley2022-09-201-0/+2
| | | | Signed-off-by: Aidan Obley <aobley@vmware.com> Co-authored-by: Tyler Schultz <tschultz@vmware.com>
* Refactor: Drop inheritance from object (#1728)Alberto Contreras2022-09-141-2/+2
| | | As we do not support python2 anymore, we can remove those 8 chars.