~juhlee/cloud-init:main

Last commit made on 2021-07-29
Get this branch:
git clone -b main https://git.launchpad.net/~juhlee/cloud-init
Only Ju-Hyoung Lee can upload to this branch. If you are Ju-Hyoung Lee please log in for upload directions.

Branch merges

Branch information

Name:
main
Repository:
lp:~juhlee/cloud-init

Recent commits

824977b... by James Falcon

testing: fix test_ssh_import_id.py (#954)

test_ssh_import_id.py occassionally fails because cloud-init finishes
before the keys have been fully imported. A retry has been added to the
test.

6e7066e... by sshedi <email address hidden>

Add ability to manage fallback network config on PhotonOS (#941)

Currently cloud-init generates fallback network config on various
scenarios.

For example:
1. When no DS found
2. There is no 'network' info given in DS metadata.
3. If a DS gives a network config once and upon reboot if DS doesn't
   give any network info, previously set network data will be
   overridden.

A newly introduced key in cloud.cfg.tmpl can be used to control this
behavior on PhotonOS.

Also, if OS comes with a set of default network files(configs), like in
PhotonOS, cloud-init should not overwrite them by default.

This change also includes some nitpicking changes of reorganizing few
config variables.

Signed-off-by: Shreenidhi Shedi <email address hidden>

4257e30... by eb3095 <email address hidden>

Add VZLinux support (#951)

Virtuozzo Linux is a distro based off of CentOS 8, similar to Alma Linux and Rocky Linux.

f0ab1e6... by PengpengSun <email address hidden>

VMware: add network-config support in ovf-env.xml (#947)

Details:
1. Support guest set network config through guestinfo.ovfEnv using OVF
2. 'network-config' Property is optional
3. 'network-config' Property's value has to be base64 encoded

Added unittests and updated ovf-env.xml example

ec6afad... by Paride Legovini

Update pylint to v2.9.3 and fix the new issues it spots (#946)

In CI run against pylint 2.9.3 and fix occurrences of:
 - W0237 (arguments-renamed)
 - W0402 (deprecated-module)

The W0402 deprecated-module was about module `imp`:

    cloudinit/patcher.py:9: [W0402(deprecated-module), ]
        Uses of a deprecated module 'imp'

The imp module is deprecated and replaced by importlib, which according
to the documentation has no replacement for acquire_lock() and
release_lock(), which are the only reason why `imp` is imported.

Nothing about the code using this lock that actually requires it.
Let's remove the locking code and the import altogether.

Dropping the locking makes patcher.patch() an empty wrapper around
_patch_logging(). Rename _patch_logging() to patch_logging() and
call it directly instead. Drop patch().

a984ee7... by Anh Vo (MSFT)

Azure: mount default provisioning iso before try device listing (#870)

With a few exceptions, Azure VM deployments receive provisioning
metadata through the provisioning iso presented as a cdrom device
(/dev/sr0). The existing code attempts to find this device by calling
blkid to find all devices that have either type iso9660 or udf. This
can be very expensive if the VM has a lot of disks. This commit will
attempt to mount the default iso location first and only tries to use
blkid to locate the iso location if the default mounting location fails

4fbe192... by James Falcon

Document known hotplug limitations (#950)

184c836... by James Falcon

Initial hotplug support (#936)

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

eacb035... by James Falcon

Fix MIME policy failure on python version upgrade (#934)

Python 3.6 added a new `policy` attribute to `MIMEMultipart`.
MIMEMultipart may be part of the cached object pickle of a datasource.
Upgrading from an old version of python to 3.6+ will cause the
datasource to be invalid after pickle load.

This commit uses the upgrade framework to attempt to access the mime
message and fail early (thus discarding the cache) if we cannot.
Commit 78e89b03 should fix this issue more generally.

881be6e... by Paride Legovini

run-container: fixup the centos repos baseurls when using http_proxy (#944)

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.