<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/cloudinit/user_data.py, branch rolling</title>
<subtitle> (mirror of https://github.com/vyos/vyos-cloud-init.git)
</subtitle>
<id>https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=rolling</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=rolling'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/'/>
<updated>2021-12-16T02:16:38+00:00</updated>
<entry>
<title>Adopt Black and isort (SC-700) (#1157)</title>
<updated>2021-12-16T02:16:38+00:00</updated>
<author>
<name>James Falcon</name>
<email>james.falcon@canonical.com</email>
</author>
<published>2021-12-16T02:16:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf'/>
<id>urn:sha1:bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf</id>
<content type='text'>
Applied Black and isort, fixed any linting issues, updated tox.ini
and CI.
</content>
</entry>
<entry>
<title>user_data: remove unused constant (#566)</title>
<updated>2020-09-15T19:00:03+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-09-15T19:00:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=839016e3014d783354bc380799d914ff81ee4efa'/>
<id>urn:sha1:839016e3014d783354bc380799d914ff81ee4efa</id>
<content type='text'>
This was added in d00126c167fc06d913d99cfc184bf3402cb8cf53, but not
removed in ef041fd822a2cf3a4022525e942ce988b1f95180 which removed the
one usage of it from the original commit.</content>
</entry>
<entry>
<title>user-data: only verify mime-types for TYPE_NEEDED and x-shellscript (#511)</title>
<updated>2020-08-14T17:51:54+00:00</updated>
<author>
<name>Ryan Harper</name>
<email>ryan.harper@canonical.com</email>
</author>
<published>2020-08-14T17:51:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=ef041fd822a2cf3a4022525e942ce988b1f95180'/>
<id>urn:sha1:ef041fd822a2cf3a4022525e942ce988b1f95180</id>
<content type='text'>
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</content>
</entry>
<entry>
<title>New feature flag functionality and fix includes failing silently (#367)</title>
<updated>2020-06-04T13:50:20+00:00</updated>
<author>
<name>James Falcon</name>
<email>TheRealFalcon@users.noreply.github.com</email>
</author>
<published>2020-06-04T13:50:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=d0b69e1815db131e893e64745a078780f33097af'/>
<id>urn:sha1:d0b69e1815db131e893e64745a078780f33097af</id>
<content type='text'>
Build time feature flags are now defined in cloudinit/features.py.
Feature flags can be added to toggle configuration options or
deprecated features. Feature flag overrides can be placed in
cloudinit/feature_overrides.py. Further documentation can be found in
HACKING.rst.

Additionally, updated default behavior to exit with an exception
if #include can't retrieve resources as expected. This behavior
can be toggled with a feature flag.

LP: #1734939</content>
</entry>
<entry>
<title>Fix cloud-init ignoring some misdeclared mimetypes in user-data.</title>
<updated>2020-03-31T15:57:23+00:00</updated>
<author>
<name>Kurt Garloff</name>
<email>kurt@garloff.de</email>
</author>
<published>2020-03-31T15:57:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=d00126c167fc06d913d99cfc184bf3402cb8cf53'/>
<id>urn:sha1:d00126c167fc06d913d99cfc184bf3402cb8cf53</id>
<content type='text'>
On some platforms (old heat on OpenTelekomCloud), the user-data mime part
is mislabeled x-shellscript.  cloud-init would not accept this unexpected
mime-type in multipart user-data.  Cloud-init will now run find_ctype()
on the content of the mime-part to check if it matches known include types.

This patch is from Ryan Harper (inspired by my bug report and a
suggestion from Scott Moser) from the discussion on PR #234.


Signed-off-by: Kurt Garloff &lt;kurt@garloff.de&gt;</content>
</entry>
<entry>
<title>Start removing dependency on six (#178)</title>
<updated>2020-01-21T22:15:30+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-01-21T22:15:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=8c4fd886931abcf2cc8627a47463907d655b35c3'/>
<id>urn:sha1:8c4fd886931abcf2cc8627a47463907d655b35c3</id>
<content type='text'>
* url_helper: drop six

* url_helper: sort imports

* log: drop six

* log: sort imports

* handlers/__init__: drop six

* handlers/__init__: sort imports

* user_data: drop six

* user_data: sort imports

* sources/__init__: drop six

* sources/__init__: sort imports

* DataSourceOVF: drop six

* DataSourceOVF: sort imports

* sources/helpers/openstack: drop six

* sources/helpers/openstack: sort imports

* mergers/m_str: drop six

This also allowed simplification of the logic, as we will never
encounter a non-string text type.

* type_utils: drop six

* mergers/m_dict: drop six

* mergers/m_list: drop six

* cmd/query: drop six

* mergers/__init__: drop six

* net/cmdline: drop six

* reporting/handlers: drop six

* reporting/handlers: sort imports
</content>
</entry>
<entry>
<title>url_helper: read_file_or_url should pass headers param into readurl (#66)</title>
<updated>2019-12-02T23:24:18+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2019-12-02T23:24:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=f69d33a723b805fec3ee70c3a6127c8cadcb02d8'/>
<id>urn:sha1:f69d33a723b805fec3ee70c3a6127c8cadcb02d8</id>
<content type='text'>
Headers param was accidentally omitted and no longer passed through to
readurl due to a previous commit.

To avoid this omission of params in the future, drop positional param
definitions from read_file_or_url and pass all kwargs through to readurl
when we are not operating on a file.

In util:read_seeded, correct the case where invalid positional param
file_retries was being passed into read_file_or_url.

Also drop duplicated file:// prefix addition from read_seeded because
read_file_or_url does that work anyway.

LP: #1854084</content>
</entry>
<entry>
<title>Be more safe on string/bytes when writing multipart user-data to disk.</title>
<updated>2018-06-13T16:54:43+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@ubuntu.com</email>
</author>
<published>2018-06-13T16:54:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=faa6f07e9de4058083a5f69ed508b6e24bd53b23'/>
<id>urn:sha1:faa6f07e9de4058083a5f69ed508b6e24bd53b23</id>
<content type='text'>
When creating the multipart mime message that is written as
user-data.txt.i, cloud-init losing data on conversion to some things
as a string.

LP: #1768600

Author: Scott Moser &lt;smoser@ubuntu.com&gt;
Co-Authored-By: Chad Smith &lt;chad.smith@canonical.com&gt;
</content>
</entry>
<entry>
<title>read_file_or_url: move to url_helper, fix bug in its FileResponse.</title>
<updated>2018-05-17T20:59:54+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@ubuntu.com</email>
</author>
<published>2018-05-17T20:59:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=30e730f7ca111487d243ba9f40c66df6d7a49953'/>
<id>urn:sha1:30e730f7ca111487d243ba9f40c66df6d7a49953</id>
<content type='text'>
The result of a read_file_or_url on a file and on a url would differ
in behavior.
  str(UrlResponse) would return UrlResponse.contents.decode('utf-8')
while
  str(FileResponse) would return str(FileResponse.contents)

The difference being "b'foo'" versus "foo".

As part of the general goal of cleaning util, move read_file_or_url
into url_helper.
</content>
</entry>
<entry>
<title>centos: Provide the failed #include url in error messages</title>
<updated>2017-11-17T03:47:02+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2017-11-17T03:47:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=6ad23fe9b11f07e4404c8a1f2f1e9cba2640dceb'/>
<id>urn:sha1:6ad23fe9b11f07e4404c8a1f2f1e9cba2640dceb</id>
<content type='text'>
On python 2.7 and earlier (CentOS 6 &amp; 7), UrlErrors raised by requests do
not report the url which failed.  In such cases, append the url if not
present in the error message.

This fixes nightly CI failures at
https://jenkins.ubuntu.com/server/view/cloud-init/.
</content>
</entry>
</feed>
