summaryrefslogtreecommitdiff
path: root/cloudinit
AgeCommit message (Collapse)Author
2013-09-25add '\n' to no key fingerprint warning Scott Moser
2013-09-25multi_log: only write to /dev/console if it exists.Scott Moser
Some containers lack /dev/console, so when multi_log attempts to open that device and write to it directly things can start going haywire. Here we address this problem by sending console-bound output to stdout and letting init take care of getting it to the console instead. We already configure upstart with "console output", so we need only change systemd to use "journal+console". The one reason that 'console output' might not be sufficient is if the user redirected output with 'output'. Ie: output: init: "> /var/log/my-cloud-init.log" Would then mean all output would go there, and anything that *needed* to go to the console (and was explicitly using multi_log for that purpose) would not get there.
2013-09-25instead of just writing to stdout, write to stdout if no /dev/consoleScott Moser
2013-09-25cc_final_message: write to log debug alsoScott Moser
2013-09-25Fix usage of libselinux-python when selinux is disabled.Garrett Holmstrom
When libselinux-python is installed, but selinux is disabled on the instance, calls to restorecon blow up. This fixes it by checking what is_selinux_enabled() returns first.
2013-09-20When selinux is completely disabled functions like restorecon raiseGarrett Holmstrom
exceptions, causing nasty things to happen on instances that boot with selinux=0. The fix is easy: simply consult is_selinux_enabled() first.
2013-09-20Some containers lack /dev/console, so when multi_log attempts to openGarrett Holmstrom
that device and write to it directly things can start going haywire. Here we address this problem by sending console-bound output to stdout and letting init take care of getting it to the console instead. We already configure upstart with "console output", so we need only change systemd to use "journal+console".
2013-09-19Fixes for the MP.Ben Howard
Changed cc_disk_setup to handle the file systems as a label, no longer passing "log" around. Tidied up the documentation to reflect the changes and made grammer, spelling and improved the content a little. Added disk_setup to the default modules list.
2013-09-11Merged in upstream changes with disk partition supportBen Howard
2013-09-11Initial cut at disk partition support.Ben Howard
2013-09-11merge from trunkScott Moser
2013-09-10some cleanups and changesScott Moser
* use util.subp from inside parse_shell_config, and adjust exception handling accordingly. * add 'switch_user_cmd' as a callback function to pass to parse_shell_config, which allows us to mock this to avoid 'sudo' when running test cases. Basically the test cases just return '[]' here. * fix some pylint * handle empty 'content' in parse_shell_config and remove the protection that was present.
2013-09-10fix DataSource base class to set up ds_cfg for 'Net' sourcesScott Moser
When the base DataSource class would set 'ds_cfg' for the specific datasources' config, it would fail for the DataSources that are just named 'DataSourceFooNet' and we wanted to set configuration in 'Foo'. For example, both DataSourceOpenNebula and DataSourceOpenNebulaNet want to read datasource config from sources: OpenNebula: foo: bar But without this change, 'ds_cfg' would not be setup properly for OpenNebulaNet.
2013-09-10Fix detection of ETHx_IP context variable, add test.Vlastimil Holer
2013-09-10Configurable OpenNebula::parseuser. Seed search dir+dev merge. ↵Vlastimil Holer
Eat shell parser error output. Few tests for tests for get_data.
2013-09-09Add support for reading 'random_seed' from data source.Scott Moser
A new field in the metadata has emerged on openstack config drive, one that provides a way to seed the linux random generator. This adds a 'random_seed' config module that writes and that it to /dev/urandom. Also added is support for reading that data on azure via the hyper-v acpi table data. In config drive datasource, it rewrites parts of the on_boot code to use a little helper class.
2013-09-09populate random_seed in azure data sourceScott Moser
Azure provides a random bit of data at '/sys/firmware/acpi/tables/OEM0'. The walinux calls this "Entropy in ACPI table provided by Hyper-V".
2013-09-10Fix pylint complain on toks.split('.')Vlastimil Holer
2013-09-10Replace RE context.sh parser with Scott's rewrite of bash dumper. Upper case ↵Vlastimil Holer
context variable names.
2013-09-09add support for reading random_seed on azure also.Scott Moser
2013-09-09remove cloudinit/exceptions.pyScott Moser
2013-09-08Add test + remove jsonschema (for now)Joshua Harlow
2013-09-08Use the same method for registering custom or default handlers.Scott Moser
Instead of having a register default handler and a register custom handler, just use the same function to do both but provide a parameter to affect how overwritting of previously existing content-types (which default handlers use to not overwrite custom ones).
2013-09-07Ensure udelta is validJoshua Harlow
It appears that udelta could have been left undefined or left defined as a string "N/A" and then put threw a float formatter previously. Fix that by ensure its set to a default and put strong checking to make sure it is a float before using float formatting.
2013-09-06Ensure validate checks key existence.Joshua Harlow
2013-09-06Add jsonschema for namespaced and verifiable moduleJoshua Harlow
configuration checking as well as make most of the module logic happen in the module itself instead of interacting with the distro object.
2013-09-05PEP8 and Pylint fixes. Move context.sh "parser" into separateVlastimil Holer
function. Fix fetching user specified dsmode (from context). Rename context_sh->context. Reuse unittests.helpers.populate_dir.
2013-09-05Merged trunk lp:cloud-initVlastimil Holer
2013-09-04Search for contextualization CDROM by LABEL=CONTEXTVlastimil Holer
2013-09-04Fix RE matching context variables. Test cleanups.Vlastimil Holer
2013-09-04Apply parse.diff by Javier Fontan <jfontan@opennebula.org>Vlastimil Holer
2013-09-03Review adjustments.Joshua Harlow
2013-09-02Raise when no seed filename providedJoshua Harlow
LP: #1198297
2013-09-02Save only 512 bytes and use different file paths for debian/rhelJoshua Harlow
LP: #1198297
2013-09-02Ensure data is initialized to a dict if its empty/noneJoshua Harlow
LP: #1198297
2013-09-02Add config drive support for random_seedJoshua Harlow
A new field in the metadata has emerged, one that provides a way to seed the linux random generator. Add support for writing the seed and rewrite parts of the on_boot code to use a little helper class. LP: #1198297
2013-08-24support base64 encoded data in the smart os datasource.Scott Moser
The big benefit of this is that now the user can put in arbitrary data into the user-data or user-script keys and there is no concern about the data being incorrectly read. Previously, if data contained '\n.\n', there was no way to differenciate that from a end of message in the serial communication format. It would be recommended that anyone using user-data on smartos base64 encode that data and specify a key of 'b64-user-data' with value 'true'.
2013-08-24changes to behavior on specifying keys.Scott Moser
The most likely end user operation (or at least a valid one) for base64 encoding would be to encode the user-data, but leave all other values as plaintext. In order to facilitate that, the user can simply add: b64-user-data=true to indicate that user-data is base64 encoded. Other changes here are to change the cloud-config and metadata keynames that are used. base64_all = boolean(True) base64_keys = [list, of, keys] Fixed up tests to accomodate.
2013-08-23Fixed some typos. Change decode_base64 from sys_cfg to ds_cfgBen Howard
2013-08-20fix bad arguments to subp inside of apply_hostname_bounceScott Moser
This simply correctly invokes subp through util.log_time. The arguments to subp is named 'args' not 'command'. LP: #1214541
2013-08-20Updated merge proposal with current treeBen Howard
2013-08-20Fixed no_base64_decode settingsBen Howard
2013-08-15do not set 'password', but set 'passwd' to crypt'd valueScott Moser
'password' was the wrong key. It should have been setting the default user's "plain_text_password". Instead of doing that, though, we're encrypting the value and putting it in 'passwd', which will then be passed on to useradd. The key value in doing this is that the plain text password will not be stored in obj.pkl. (admittedly it is still in plain text in the ovf-env.xml file).
2013-08-14cc_growpart: prefer growpart over parted 'resizepart'Scott Moser
the resizepart code was not functional. We will re-favor it later under bug 1212492. For now, we'll just favor the 'growpart' resizer. Both will be found in Ubuntu cloud images. LP: #1212444
2013-08-14cc_growpart: prefer growpart over parted 'resizepart'Scott Moser
the resizepart code was not functional. We will re-favor it later under bug 1212492. For now, we'll just favor the 'growpart' resizer. Both will be found in Ubuntu cloud images. LP: #1212444
2013-08-06merge from trunkScott Moser
2013-08-06fix pep8 and pylint warningsScott Moser
2013-08-06remove unused importScott Moser
2013-08-06remove unused LOG Scott Moser
2013-08-06initially add support for apt_ftp_proxy and apt_https_proxy. tests to come.Scott Moser
LP: #1057195