| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
Signed-off-by: Jacob Salmela <jacob.salmela@hpe.com>
|
|
|
|
|
| |
This fixes KeyError on specific network configuration when running
cloud-init on "network" stage. The same problem was mentioned in
#746 and #1041.
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Complete the examples that the suggested code work.
The examples in this script are not correct and should be adjusted accordingly.
|
|
|
|
| |
This contributor was added on a downstream ubuntu/devel branch
and should be reflected in main too
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
LP: #1815990
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
| |
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".
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
| |
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
|
|
|
| |
Currently, FreeBSD ignores IPv6 addresses. This PR adds support for static IPv6 addresses
|
|
|
|
|
|
|
|
|
|
|
| |
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 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Add schema auto-format to tox and a CI test
|
| |
|
| |
|
| |
|
|
|
|
| |
I am writing a cloud platform (nwcs) and need to add support
to cloud-init.
|
| |
|
|
|
|
| |
Apport screens out symlinks, so we should send realpath() normalized
paths instead.
|
|
|
|
| |
`git branch --show-current` option flag is only available
in focal+. Use `git rev-parse --abbrev-ref HEAD` instead.
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Aidan Obley <aobley@vmware.com>
Co-authored-by: Tyler Schultz <tschultz@vmware.com>
|
|
|
| |
As we do not support python2 anymore, we can remove those 8 chars.
|