summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-03-17systemd: update config and final to run even if init jobs failScott Moser
LP: #1432758
2015-03-17SmartOS: fixes for python3 reading from serial device.Scott Moser
We were hitting exceptions when writing to the SmartOS serial console and, once that was fixed, we were hanging permanently waiting for b"." == "." to be true. This fixes both of those issues.
2015-03-16emit_upstart: fix use of undeclared variableScott Moser
2015-03-13Write and read bytes to/from the SmartOS serial console.Daniel Watkins
2015-03-11userdata-handlers: python3-related fixes on do-not-process-this-part pathOleg Strikov
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.
2015-03-10DataSourceMAAS: fix timestamp error in oauthlibScott Moser
oddly enough, the timestamp you pass into oauthlib must be a None or a string. If not, raises ValueError: Only unicode objects are escapable. Got 1426021488 of type <class 'int'>
2015-03-10DataSourceMAAS: remove debug statementScott Moser
2015-03-05snappy: disable by defaultScott Moser
this does 2 things actually a.) disables snappy by default, and adds checks to filesystem to enable it this way it runs on snappy systems, but not on others. b.) removes the 'render2env' that was mostly spike code. LP: #1428495
2015-03-05fixes from testingScott Moser
2015-03-05DataSourceMAAS: adjust local timestamp in case of clock skewScott Moser
This functionality has been introduced to fix LP: #978127, but was lost while migrating cloud-init to python3. LP: #1427939
2015-03-05do not raise exception on non-existant channel.ini fileScott Moser
2015-03-05DataSourceMAAS: generate oauth headers with adjusted timestamp in case of ↵Oleg Strikov
clock skew This functionality has been introduced to fix LP: #978127, but was lost while migrating cloud-init to python3.
2015-03-05fixes bug: https://launchpad.net/bugs/1428495Scott Moser
snappy: disable by default this does 2 things actually a.) disables snappy by default, and adds checks to filesystem to enable it b.) removes the 'render2env' that was mostly spike code.
2015-03-04Fix hang caused by HTTPretty on Python 3.4.2.Scott Moser
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.
2015-03-04Add util.message_from_string to wrap email.message_from_string.Scott Moser
This is to work-around the fact that email.message_from_string uses cStringIO in Python 2.6, which can't handle Unicode.
2015-03-04pull in 'snappy' supportScott Moser
This allows config to disable some of the config modules that were failing and logging WARN on snapy. Also adds the snappy module and changes the syslog perms to take a list of user:groups rather than just a single. LP: #1428139
2015-03-04apt_configure: allow disablingScott Moser
2015-03-04grub-dpkg: allow to be disabledScott Moser
2015-03-04locale: make able to be turned offScott Moser
2015-03-04fix logging perms with list rather than singleScott Moser
2015-03-04Add util.message_from_string to wrap email.message_from_string.Daniel Watkins
This is to work-around the fact that email.message_from_string uses cStringIO in Python 2.6, which can't handle Unicode.
2015-03-04Fix invalid format string in CloudSigma logging.Daniel Watkins
2015-03-04Convert dmidecode values to sysfs names before looking for them.Scott Moser
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. LP: #1427687
2015-03-04Use more consistent logging invocation.Daniel Watkins
2015-03-04add snappy moduleScott Moser
2015-03-04run emit_upstart only if upstart was init systemScott Moser
2015-03-04Fix hang caused by HTTPretty on Python 3.4.2.Daniel Watkins
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.
2015-03-04Convert dmidecode values to sysfs names before looking for them.Daniel Watkins
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.
2015-03-03packages/debian: move software-properties-common to recommends, add eatmydataScott Moser
2015-03-02MAAS: fix oauth imports and reading of command line seed.Scott Moser
LP: #1427263
2015-03-02DataSourceMAAS: fix oauthlib importsScott Moser
In both python2 and python3, This throws "'module' object has no attribute 'oauth1'" $ python3 -c 'import oauthlib; oauthlib.oauth1.Client("x")' While this works fine: $ python3 -c 'import oauthlib.oauth1 as oauth1; oauth1.Client("x")'
2015-03-02get_cmdline_url: fix in python3 when callingScott Moser
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.
2015-03-02util.py: remove 'print' debug statementScott Moser
2015-03-02url_helper.py: fix undefined variableScott Moser
python2 scoping is different and running wait_for_url in python3 results in a use of undeclared variable 'e'. $ python3 -c 'from cloudinit import url_helper; \ url_helper.wait_for_url("o", max_wait=3,timeout=1, exception_cb=print)' Traceback (most recent call last): File "<string>", line 1, in <module> File "cloudinit/url_helper.py", line 358, in wait_for_url exception_cb(msg=status_msg, exception=e)
2015-03-02pep8Scott Moser
2015-02-26readurl, read_file_or_url returns bytes, user must convert as necessaryScott Moser
* explicitly test compressed user-data. * userdata_raw is now bytes * add load_tfile_or_url for loading text file or url * 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. LP: #1424900
2015-02-26status_wrapper: do not swallow errorsScott Moser
2015-02-26avoid conversion to string in #includeScott Moser
2015-02-25UserDataProcessor: during include, do not convert to stringScott Moser
an include can include a gzip type also or binary data so avoid conversion here.
2015-02-25move towards user-data being binaryScott Moser
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.
2015-02-24further fixing of non-text user-data.Scott Moser
2015-02-24move recently added test_udprocess tests to test_data, improve a bitScott Moser
explicitly test compressed user-data.
2015-02-24Azure: Fix consumption of user-dataScott Moser
This was previously broken in python3 as the userdata would be bytes rather than a string. LP: #1423972
2015-02-24use util.decode_binary rather than str, add tests.Scott Moser
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).
2015-02-24tox: set LC_ALL=en_US.utf-8 rather than CScott Moser
this works around an issue in httpretty where it is not able to install in tox if LC_ALL is set to C.
2015-02-24CloudStack: support fetching password from virtual routerScott Moser
LP: #1422388
2015-02-24merge from trunkScott Moser
2015-02-23Make parameter list for get_hostname method consistentJoshua Harlow
2015-02-23Add documentation about upstream CloudStack HTTP fix.Daniel Watkins
2015-02-23Always close the password server connection, even on failure.Daniel Watkins