| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Bump the version in cloudinit/version.py to 23.1.2 and
update ChangeLog.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because user data and vendor data may contain sensitive information,
this commit ensures that any user data or vendor data written to
instance-data.json gets redacted and is only available to root user.
Also, modify the permissions of cloud-init.log to be 640, so that
sensitive data leaked to the log isn't world readable.
Additionally, remove the logging of user data and vendor data to
cloud-init.log from the Vultr datasource.
LP: #2013967
CVE: CVE-2023-1786
|
|
|
|
|
| |
Bump the version in cloudinit/version.py to 23.1.1 and
update ChangeLog.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are effectively two regressions in the recent IMDS refactor:
1. The metadata check len(imds_md["interface"]) in
_check_if_nic_is_primary() is no longer correct as the refactor
switched URLs and did not update this call to account for the
fact that this metadata now lives under "network".
2. Network metadata was fetched with infinite=True and is now limited
to ten retries. This callback had the twist of only allowing up to
ten connection errors but otherwise would retry indefinetely.
For check_if_nic_is_primary():
- Drop the interface count check for _check_if_nic_is_primary(),
we don't need it anyways.
- Fix/update the unit tests mocks that allowed the tests to pass,
adding another test to verify max retries for http and connection
errors.
- Use 300 retries. We do want to hit a case where we spin forever,
but this should be more than enough time for IMDS to respond in
the Savable PPS case (~5 minutes).
For IMDS:
- Consolidate IMDS retry handlers into a new ReadUrlRetryHandler class
that supports the options required for each variant of request.
- Minor tweaks to log and expand logging checks in unit tests.
- Move all unit tests to mocking via mock_requests_session_request
and replace mock_readurl fixture with wrapped_readurl to improve
consistency between tests.
Note that this change drops usage of `retry_on_url_exc` and can probably
be removed altogether as it is no longer used AFAICT.
Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
|
|
|
|
|
| |
Bump the version in cloudinit/version.py to 23.1 and
update ChangeLog.
|
|
|
|
|
|
| |
openSUSE/SUSE has distros that use read only root and btrfs. To update
a running system in such a setup the transactional-update command
needs to be used. This change implements support for use of the
transactional-update commend when appropriate.
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
Create new azure package for better organization and move
IMDS logic for fetching into it.
Future work will clean up the test_azure.py tests a little
further thanks to these changes, but wanted to minimize churn
here to make changes fairly visible.
Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
docs: deprecation version generation support
schema: Add the following metadata keys:
- changed_version
- deprecated_version
- new_version
- changed_description
- new_description
- deprecation_description
- changed
- new
Generate formatted docs from this new metadata.
Update current descriptions containing unstructured data.
Switch current deprecation from a date to deprecated version.
Ensure changed/new/deprecated keys have associated version keys.
|
|
|
|
|
|
|
|
|
|
|
|
| |
- is_virtual property identifies identify if the thing we're running
is any kind of virtualization
- virtual() identifies what kind of virtualisation we're dealing with
- is_container() tells us if we're running in a container, or in FreeBSD's
case, in a jail.
- the helper functions are @lru_cached, since this is very unlikely to
change
Sponsored by: The FreeBSD Foundation
Co-authored-by: Brett Holman <brett.holman@canonical.com>
|
|
|
| |
LP: #1999164
|
|
|
|
|
| |
When annotating a schema, we should print "Valid cloud-config" along
with the filename if a file has been used rather than just the config
type.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change "ca-certs" references to "ca_certs".
New certificates are written to individual files, with an incrementing
number as part of their filename, rather than all being placed in a
single file. This resolves issues caused when certificate files
containing more than a single certificate are placed in /etc/ssl/certs
(by utilities such as "update-ca-certificates" run by ca_certs).
Alpine / Debian / Ubuntu:
The current behaviour, whilst it works, is incorrect with regard to
the design of the underlying OS utilities for managing certificates.
For "remove_defaults" the system-installed certificate files should not
be actually deleted (otherwise it becomes problematic if someone wishes
to later re-enable one or more of them), rather they should be
deactivated and these OSes already provide the means to do so - this MR
modifies the certificate entries in the /etc/ca-certificates.conf file
by prefixing them with "!" - when the update-ca-certificate utility is
then run it will *not* place such delimited certificates into either the
/etc/ssl/certs/ directory (via symlinks) nor add them to the
(re)generated certificates bundle file.
Additionally it is incorrect for added certificates to be placed in the
/usr/share/ca-certificates directory - this location is intended for
standard/"official" certificates, the /usr/local/share/ca-certificates
directory is intended for "local" or "site-specific" certificates and so
this PR adds them there instead - for certs in
/usr/local/share/ca-certificates the update-ca-certificates utility will
automatically use them, there is *no* need to add their filenames to the
/etc/ca-certificates.conf file.
LP: #1931174
|
|
|
|
|
|
|
| |
This writes a byte string to the device instead of a string when
purging the partition table.
Essentially, this will prevent the error "a bytes-like object is
required, not 'str'" from happening.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cloud-init schema --annotate now walks any valid
user-data, vendor-data and vendor2-data to report
whether any of these cloud-config files provide invalid
or deprecated schema values.
Also, fix a bug in nested mapping annotations to
properly report the full nested indexed schema path.
The following now can be annotated without KeyErrors:
users:
- default
- lock-passwd: false
name: root
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Added google verification file to ensure that the
Google bots can find and index the site. Should
speed up the listing of our docs in Google's
search results.
|
|
|
|
|
|
|
| |
404 styling was off due to invalid config
notfound_urls_prefix = "/"
Drop custom config. The default "/en/latest"
value properly renders the 404 page with style.
|
|
|
| |
LP: #1815990
|
| |
|
|
|
| |
LP #2004599
|
| |
|
|
|
|
|
| |
Retain existing config file permissions when those permissions are
more strict than the default permissions set on
/etc/netplan/50-cloud-init.yaml.
|
|
|
|
|
|
| |
Stop deleting cloud-id-<cloudname> unless there is a change in
discovered datasource cloud-id.
LP: #1998998
|
|
|
|
| |
If no SSH restart happens, we get no log. Since this is perfectly
normal, we shouldn't be checking for a log.
|
|
|
|
|
|
|
| |
mscc_felix and fsl_enetc are drivers representing a switch that is
expected to have duplicate macs. If we encounter either of these
drivers, we should not raise the duplicate mac exception.
LP: #1997922
|
|
|
|
| |
It is possible to create an empty network key that fails
over to fallback network config without warning. Fix it.
|
|
|
| |
cloud_interfaces is intended to be a netcfg. Change the helper function to reflect this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cc_puppet: Update puppet service name to puppet-agent
From Lunar, we see that the default puppet version is 7.20
which replaces `puppet.service` with `puppet-agent.service`.
Thus, we need to have a way of calling the appropriate
service depending on the distribution of puppet installed.
Attempt to install, start or enable puppet-agent first and fallback
to puppet.
Log warnings if neither preferred package names exist or if the
package_name in user-data is not able to be configured.
LP: #2002969
|
|
|
|
| |
- Add stronger warnings for resolv_conf module.
- Add link to lxd network config docs.
|
|
|
|
|
| |
Drop httpretty from list of ignored modules to type-check.
This module was dropped in favor of responses.
|
|
|
|
|
| |
On Bionic in GCE, when restarting ssh, it's not uncommon to see a
traceback with `ssh.service is not active, cannot reload.`. Instead log
a warning.
|
|
|
|
| |
Fix test_lp1912844.py where the intance's ip was not
correctly detected in pycloudlib
|
|
|
| |
Bionic will no longer be supported by version in pip
|
|
|
|
|
| |
Newer SUSE distributions are switching to NetworkManager from wicked.
For those distributions we need to wait for NetworkManager before
starting the cloud-init service.
|
|
|
|
|
|
|
|
|
|
| |
Minor changes for Diataxis:
1) Added "reverse" to front page section blocks so they display
correctly on mobile/smaller screens.
2) Added links to security/performance pages from Explanation
section. These were linking directly to the pages in
the Development section and will eventually become more like
signposts as more content is added/revised.
|
|
|
|
|
|
|
| |
changes:
- drop caching machinery for LXD images and chroots
- divide the workflow in two steps, one for building packages
and other for running the tests so that the second one can
be retried in case of error
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
| |
::/0 would get rendered as ::/64 rather than ::/0 across all renderers
using ipv6 in a v2 config.
LP: #2003562
|
| |
|