Age | Commit message (Collapse) | Author |
|
openEuler Homepage: https://www.openeuler.org/en/
|
|
The distribution class has a field that specifies the location of
the system hosts file and this can be overridden in subclasses.
While the field is correctly used in distro.update_etc_hosts(), the
update_etc_hosts module does not use it and just assumes '/etc/hosts'
This fixes the module to use the distribution-specific variable.
|
|
https://www.cloudlinux.com/
|
|
Using flake8 inplace of pyflakes
Renamed run-pyflakes -> run-flake8
Changed target name to flake8 in Makefile
With pyflakes we can't suppress warnings/errors in few required places.
flake8 is flexible in that regard. Hence using flake8 seems to be a
better choice here.
flake8 does the job of pep8 anyway.
So, removed pep8 target from Makefile along with tools/run-pep8 script.
Included setup.py in flake8 checks
|
|
This patch updates the ds-identify file to pass the
popular shell linter, shellcheck. Updates include:
* Global ignore for error code 3043, the warning about
the "local" keyword not being POSIX compliant. This
keyword is used everywhere and cannot be easily removed.
* Point-of-use ignore for error code 3013, the warning
about the "-nt" comparator not being POSIX compliant.
There's no POSIX compliant way to compare timestamps
on two files without forking a new process, so this
comparator remains.
* Several point-of-use ignores for error code 2254, the
warning about quoting parameters. These warnings are
ignored for the *_matches functions where wildcard
tokens are expected to be used. Quoting the parameters
would prevent the desired globbing and cause calls
to these functions with wildcards to fail.
* A point-of-use ignore for error code 2086 for the
same reason as the above ignore -- allowing globbing
to take place for matching.
* Quoted parameters in the remainder of the locations
where it was safe to do so and did not break the
tests.
|
|
|
|
Alters hotplug hook to have a query mechanism checking if the
functionality is enabled. This allows us to avoid using the hotplug
socket and service when hotplug is disabled.
|
|
This patch reverts an unnecessary lcase optimization in the
ds-identify script. SystemD documents the values produced by
the systemd-detect-virt command are lower case, and the mapping
table used by the FreeBSD check is also lower-case.
The optimization added two new forked processes, needlessly
causing overhead.
|
|
This patch updates the dscheck_VMware function's use of "vmware-rpctool".
When checking to see if a "guestinfo" property is set.
Because a successful exit code can occur even if there is an empty
string returned, it is possible that the VMware datasource will be
loaded as a false-positive. This patch ensures that in addition to
validating the exit code, the emitted output is also examined to ensure
a non-empty value is returned by rpctool before returning "${DS_FOUND}"
from "dscheck_VMware()".
|
|
|
|
This patch finally introduces the Cloud-Init Datasource for VMware
GuestInfo as a part of cloud-init proper. This datasource has existed
since 2018, and rapidly became the de facto datasource for developers
working with Packer, Terraform, for projects like kube-image-builder,
and the de jure datasource for Photon OS.
The major change to the datasource from its previous incarnation is
the name. Now named DatasourceVMware, this new version of the
datasource will allow multiple transport types in addition to
GuestInfo keys.
This datasource includes several unique features developed to address
real-world situations:
* Support for reading any key (metadata, userdata, vendordata) both
from the guestinfo table when running on a VM in vSphere as well as
from an environment variable when running inside of a container,
useful for rapid dev/test.
* Allows booting with DHCP while still providing full participation
in Cloud-Init instance data and Jinja queries. The netifaces library
provides the ability to inspect the network after it is online,
and the runtime network configuration is then merged into the
existing metadata and persisted to disk.
* Advertises the local_ipv4 and local_ipv6 addresses via guestinfo
as well. This is useful as Guest Tools is not always able to
identify what would be considered the local address.
The primary author and current steward of this datasource spoke at
Cloud-Init Con 2020 where there was interest in contributing this datasource
to the Cloud-Init codebase.
The datasource currently lives in its own GitHub repository at
https://github.com/vmware/cloud-init-vmware-guestinfo. Once the datasource
is merged into Cloud-Init, the old repository will be deprecated.
|
|
|
|
Implement missing device_aliases feature
The device_aliases key has been documented as part of disk_setup for
years, however the feature was never implemented. This implements the
feature as documented allowing usercfg (rather than dsconfig) to create
a mapping of device names.
This is not to be confused with disk_aliases, a very similar map but
existing solely for use by datasources.
LP: #1867532
|
|
Virtuozzo Linux is a distro based off of CentOS 8, similar to Alma Linux and Rocky Linux.
|
|
Adds a udev script which will invoke a hotplug hook script on all net
add events. The script will write some udev arguments to a systemd FIFO
socket (to ensure we have only instance of cloud-init running at a
time), which is then read by a new service that calls a new 'cloud-init
devel hotplug-hook' command to handle the new event.
This hotplug-hook command will:
- Fetch the pickled datsource
- Verify that the hotplug event is supported/enabled
- Update the metadata for the datasource
- Ensure the hotplugged device exists within the datasource
- Apply the config change on the datasource metadata
- Bring up the new interface (or apply global network configuration)
- Save the updated metadata back to the pickle cache
Also scattered in some unrelated typing where helpful
|
|
The EPEL repo file used to have download.fedoraproject.org as its
baseurl. That has now been replaced by `download.example`, which we need
to replace with dl.fedoraproject.org, the actual mirror we want to
download from.
We can't use download.fedoraproject.org or the mirrorlist (which is the
default way for finding mirrors) because of our internal proxy rules.
This change only applies if http_proxy is set, otherwise the mirrors are
reached in the default way.
|
|
|
|
|
|
Also added a new (currently experimental) systemd-networkd renderer,
and includes a small refactor to cc_resolv_conf.py to support the
resolved.conf used by systemd-resolved.
|
|
The name "DigitalOcean" doesn't have a space in it; it's a single
compound word written in Pascal case (upper camel case).
|
|
- small document update for ReportEventStack explaining post_files
parameter
- small unit test for test_reporting demonstrating the close of an
event with optional post_files list
|
|
Reuse the FreeBSD logic to be able to switch between Python3 versions
easily.
|
|
Rocky Linux is a RHEL-compatible distribution so all changes that have
been made should be trivial.
|
|
|
|
Changed year 2012 into 2032
|
|
AlmaLinux OS is RHEL-compatible so all the changes needed are trivial.
|
|
|
|
Move chef_license from TPL_PATH_KEYS to TPL_KEYS as the chef license
setting is not a path but must be added to the client config template.
Fixes file or folder not found exception raised from ensure_dirs.
|
|
The blkdev command is fragile re-reading partition tables if a
partition is mounted. This change instead uses the partprobe if
it is available.
LP: #1920939
|
|
This PR adds in support so that cloud-init can run on instances
deployed on Vultr cloud. This was originally brought up in #628.
Co-authored-by: Eric Benner <ebenner@vultr.com>
|
|
|
|
When bringing up DHCP-provided static routes, we check for "0.0.0.0/0"
to indicate an unspecified gateway. However, when parsing the static
route in `parse_static_routes`, the gateway is never specified with
a net length, so the "/0" will never happen.
This change updates the gateway check to check only for "0.0.0.0".
|
|
|
|
When output of SSH host keys and/or SSH fingerprints are disabled for
all keys do not display headers and footers.
Prevent risk of message text being interpreted as "logger" option by
appending "--" to logger options.
Correct syslog output that was tagged with "ec2" regardless of DataSource
in use. Now use "cloud-init" tag instead.
Various "shellcheck" corrections.
Add testcase for disabled output of SSH host keys.
|
|
key is a property of source1 and not sources
|
|
The implementation in existing datasources means that vendordata_raw is
not "raw" as it ideally would be. Instead, actual values may include
bytes, string or list. If the value was a list, then the attempt to
persist that data to a file in '_store_rawdata' would raise a
TypeError.
The change is to encode with util.json_dumps (which is safe for
binary data) before writing.
|
|
hostname (inetutils) isn't installed per default on arch, so switch
to hostnamectl which is installed per default (systemd).
|
|
It is distro dependent whether hostname or fqdn is used
|
|
New datasource utilizing UpCloud metadata API, including relevant unit
tests and documentation.
|
|
Signed-off-by: Jordi Massaguer Pla <jmassaguerpla@suse.de>
|
|
|
|
|
|
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>
|
|
|
|
Route '-net' parameter is incompatible with /32 IPv4 addresses so we
have to use '-host' in that case.
|
|
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>
|
|
|
|
1. fix a typo in cloud-init.1
2. add xiachen-rh as contributor
|
|
This refactors cc_ca_certs to support non-ca-certificates distros, and
adds RHEL support.
|
|
This commit removes lines which are invalid configuration.
|