Age | Commit message (Collapse) | Author |
|
This takes away our dependency on walinux-agent, by providing a builtin
path for doing cloud-init had delegated to it.
Currently the default is to still use the old path, but adding this code
in will allow us to move to the new code path with more confidence.
|
|
read_seeded was assuming a Response object back from load_tfile_or_url
but load_tfile_or_url was returning string.
since the only other user of this was a test, move load_tfile_or_url to
a test, and just do the right thing in read_seeded.
LP: #1455233
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LP: #1424277
|
|
LP: #1311463
|
|
|
|
Due to the way the azure boot works, where we identify the hostname to the
fabric, we were inadvertently overwriting hostname that the user had set.
LP: #1375252
|
|
|
|
|
|
handling of cloud-config-archive input would fail in fully_decoded_payload.
part.get_charset() would return a Charset object, but
get_charset.input_codec is a string suitable for passing to decode.
This handles that correctly, and is more careful about binary data inside
input.
The test added verifies that cloud-config inside a cloud-config-archive
is handled correctly and also that binary data there is ignored without
exceptions raised.
LP: #1445143
|
|
|
|
|
|
Including minor refactoring to make mocking considerably easier.
|
|
It was believed that to install a package with config the command was:
snappy install --config=config-file <package>
Instead, what was implemented in snappy was:
snappy install <package> [<config-file>]
This modifies cloud-init to invoke the latter and changes the tests
appropriately.
LP: #1438836
|
|
|
|
On fspath installs, look for .config files harder.
Given a file named:
pkg.namespace_0.version_arch.snap
We'll search for config files named:
pkg.namespace_0.version_arch.config
pkg.namespace.config
pkg.config
|
|
|
|
the input to 'snappy config <packagename>' is expected to have
config:
<packagename>:
content:
So here we pad that input correctly. Note, that a .config file
on disk is not modified.
Also, we change 'configs' to just be 'config', to be possibly compatible
with the a future 'snappy config /' that dumped:
config:
pkg1: data1
pkg2: data2
|
|
|
|
|
|
|
|
|
|
|
|
We are treating JoyentMetadataClient as a unit which the data source
depends on, so we mock it out instead of providing a fake implementation
of it.
|
|
|
|
|
|
|
|
|
|
Cloud-init crashed when received multipart userdata object with
'application/octet-stream' part or some other 'application/*' part
except archived ones (x-gzip and friends). These parts are not
processed by cloud-init and result only in a message in the log.
We used some non-python3-friendly techniques while generating
this log message which was a reason for the crash.
|
|
HTTPretty can causes hangs on Python 3.4.2 (and maybe Python 3.4.1), due
to a Python bug (fixed in Python 3.4.3). This works around the problem
in the appropriate Python versions.
See https://github.com/gabrielfalcao/HTTPretty/pull/193 and
https://github.com/gabrielfalcao/HTTPretty/issues/221 for details.
|
|
This is to work-around the fact that email.message_from_string uses
cStringIO in Python 2.6, which can't handle Unicode.
|
|
HTTPretty can causes hangs on Python 3.4.2 (and maybe Python 3.4.1), due
to a Python bug (fixed in Python 3.4.3). This works around the problem
in the appropriate Python versions.
See https://github.com/gabrielfalcao/HTTPretty/pull/193 and
https://github.com/gabrielfalcao/HTTPretty/issues/221 for details.
|
|
dmidecode and /sys/class/dmi/id/* use different names for the same
information. This modified the logic in util.read_dmi_data to map from
dmidecode names to sysfs names before looking in sysfs.
|
|
get_cmdline_url was passing a string to response.contents.startswith()
where response.contents is now bytes.
this changes it to convert input to text, and also to default to text.
|
|
|
|
Fixes bug 1424277.
|
|
UrlResponse: biggest change... make readurl return bytes, making user
know what to do with it.
util: add load_tfile_or_url for loading text file or url
as read_file_or_url now returns bytes
ec2_utils: all meta-data is text, remove non-obvious string translations
DigitalOcean: adjust for ec2_utils
DataSourceGCE, DataSourceMAAS: user-data is binary other fields are text.
openstack.py: read paths without decoding to text. This is ok as paths
other than user-data are json, and load_json will handle
load_file still returns text, and that is what most things use.
|
|
explicitly test compressed user-data.
|
|
This was previously broken in python3 as the userdata would be bytes
rather than a string.
LP: #1423972
|
|
just seems to make more sense to decode here.
Add a test showing the previous failure (testBytesInPayload)
And one that should pass (testStringInPayload)
Also, add a test for unencoded content in the ovf xml (test_userdata_plain)
And explicitly set encoding on another test (test_userdata_found).
|
|
|
|
|
|
This should fix the Azure data source on Python 3, and is appropriate as
XML shouldn't really be read as a string.
|