~powersj/cloud-init:master

Last commit made on 2020-08-17
Get this branch:
git clone -b master https://git.launchpad.net/~powersj/cloud-init
Only Joshua Powers can upload to this branch. If you are Joshua Powers please log in for upload directions.

Branch merges

Branch information

Name:
master
Repository:
lp:~powersj/cloud-init

Recent commits

a4b6b96... by Ryan Harper

cli: add devel make-mime subcommand (#518)

* cli: add devel make-mime subcommand

Cloud-init documents an in-source-tree tool, make-mime.py used to
help users create multi-part mime user-data. This tool is not shipped
in the cloud-init install and unavailable at runtime. This patch
takes tools/make-mime.py and makes the functionality available via
the devel subcommand.

The primary interface of --attach file:content-type is still present.
The cli now adds:

 -l, --list-types Print out a list of supported content-types
 -f, --force Ignore errors for unsupported content-types

The tool will now raise a RunTime error if the supplied content-type
is not supported (or more likely a typo:
  x-shell-script vs. x-shellscript)

* make-mime: write to stderr and exit 1 instead of raising RuntimeError

* Update example to match docs

* Update docs for make-mime subcommand

* Remove tools/make-mime.py; replaced by cloud-init devel make-mime

Co-authored-by: Rick Harding <email address hidden>

ef041fd... by Ryan Harper

user-data: only verify mime-types for TYPE_NEEDED and x-shellscript (#511)

Commit d00126c167fc06d913d99cfc184bf3402cb8cf53 regressed cloud-init
handling in multipart MIME user-data. Specifically, cloud-init would
examine the payload of the MIME part to determine what the content
type and subsequently which handler to use. This meant that user-data
which had shellscript payloads (starts with #!) were always handled
as shellscripts, rather than their declared MIME type and affected
when the payload was handled.

One failing scenario was a MIME part with text/cloud-boothook type
declared and a shellscript payload. This was run at shellscript
processing time rather than boothook time resulting in an change in
behavior from previous cloud-init releases.

To continue to support known scenarios where clouds have specifed
a MIME type of text/x-shellscript but provided a payload of something
other than shellscripts, we're changing the lookup logic to check for
the TYPES_NEEDED (text/plain, text/x-not-multipart) and only
text/x-shellscript.

It is safe to check text/x-shellscript parts as all shellscripts must
include the #! marker and will be detected as text/x-shellscript types.
If the content is missing the #! marker, it will not be excuted. If
the content is detected as something cloud-init supports, such as
 #cloud-config the appropriate cloud-init handler will be used.

This change will fix hanldling for parts which were shellscripts but
ran with the wrong handler due to ignoring of the provided mime-type.

LP: #1888822

2d3533b... by Dan Watkins

DataSourceOracle: retry twice (and document why we retry at all) (#536)

c3556ae... by Johnson Shi

Refactor Azure report ready code (#468)

This PR refactors Azure report ready code to include more robust tests and telemetry.

1212675... by Dan Watkins

tox.ini: pin correct version of httpretty in xenial{,-dev} envs (#531)

The version was bumped in c7248059dd2faaaadfbcef5c83e8e8ea166d6767 to
support running on Python 3.7+ systems. Now that we have separate
`xenial` and `xenial-dev` tox environments, we can restore the correct
pinning for `xenial` without breaking `xenial-dev` on developer
machines.

Also drop the `mock` dependency from `xenial-shared-deps`; its removal
was missed in 5f8f85bb38cc972d3d2c705a1ec73db3f690f323.

546617c... by James Falcon <email address hidden>

Support Oracle IMDSv2 API (#528)

* v2 of the API is now default with fallback to v1.
* Refactored the Oracle datasource to fetch version, instance, and vnic metadata simultaneously.

f912024... by Dan Watkins

.travis.yml: run a doc build during CI (#534)

We have doc8 configured, so we should use it to gate documentation
changes.

545b1c7... by Dan Watkins

doc/rtd/topics/datasources/ovf.rst: fix doc8 errors (#533)

Plus a minor formatting improvement.

4fb7eab... by sshedi <email address hidden>

Fix 'Users and Groups' configuration documentation (#530)

Few of the 'User and Groups' configurations in cloud-config have no effect on
already existing users. This was not documented earlier.

This change set adds that information to documentation.

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

6ac71fd... by Dan Watkins

cloudinit.distros: update docstrings of add_user and create_user (#527)

This aligns their docstrings more closely with their actual behaviour.