summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-09-27change LOG.debug('format' % var) to ('format', var)Scott Moser
2013-09-27fix one bugScott Moser
2013-09-27fix test to adjust for 'ephemeral0' being /dev/sdbScott Moser
2013-09-27demote .info to .debug, add another debugScott Moser
2013-09-27merge from ben. disable partition creation on smartosScott Moser
2013-09-27adjust aliases early rather than late.Scott Moser
this adds 2 functions update_disk_setup_devices update_fs_setup_devices Which update the appropriate datatype, and translate the names. Translating early means we don't have to deal with updating in the mkfs or mkpart calls explicitly. These are more easily unit tested as they just take a dictionary of the expected type and a 'transformer' that should return a new name or None.
2013-09-27update to get functional with any alias in a 'device' entryScott Moser
2013-09-27Disable partitioning of ephemeral for SmartOS at request of JoyentBen Howard
2013-09-27fix syntax error in last commitScott Moser
2013-09-27azure data source 'ephemeral0' point to '/dev/sdb', not /dev/sdb1Scott Moser
in general block device mappings should be to block devices, not partitoins.
2013-09-27update documentationScott Moser
2013-09-27fix probably debug code that explicitly set 'partition' to 'any'.Scott Moser
2013-09-27fix doc for smartosScott Moser
2013-09-27fix tests small other changesScott Moser
Also * cloudinit/sources/DataSourceAzure.py: invalid xml in a file called 'ovfenv.xml' should raise BrokenAzureDatasource rather than NonAzureDataSource * cloudinit/sources/DataSourceSmartOS.py: cloudinit/sources/DataSourceAzure.py use 'ephemeral0' as the device name in builtin fs_setup * tests/unittests/test_datasource/test_azure.py: * always patch 'list_possible_azure_ds_devs' as it calls find_devs_with which calls blkid, and dramatically was slowing down tests on my system. * test_user_cfg_set_agent_command_plain: fix this test to not depend on specific format of yaml.dumps(). * test_userdata_arrives: add a test that user-data makes it through
2013-09-26re-work 'ephemeral_disk' and location of builtin configScott Moser
Previously we had this 'ephemeral_disk' entry in the datasource config for Azure, and then we also copied some entries into the .cfg for that datasource from the datasource config. Ie, datasource['Azure']['disk_setup'] would be oddly copied into the .cfg object that was returned by 'get_config_obj' Now, instead, we have a BUILTIN_CLOUD_CONFIG, which has those same values in it. The other change here is that 'ephemeral_disk' now has no meaning. Instead, we add a populated-by-default entry 'disk_aliases' to the BUILTIN_DS_CFG, and then just return entries in it for 'device_name_to_device'
2013-09-26add entry to ChangeLogScott Moser
2013-09-26fix pep8Scott Moser
2013-09-26merge from trunkScott Moser
2013-09-26Added support for formating the ephemeral disk on Windows Azure.Ben Howard
2013-09-26fix spelling in ChangeLogScott Moser
2013-09-25update ChangeLogScott Moser
2013-09-25bddeb: depend on cloud-utils or cloud-guest-utilsScott Moser
saucy split cloud-utils into cloud-guest-utils and cloud-image-utils. The former is in the cloud image, the latter is not, and we actually need it for growpart which is in the former.
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-20add support for partitioning and creating filesystemsScott Moser
If the disks that are attached on boot do not have a filesystem on them, then this module is useful to set that up. LP: #1218506
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-19Merged in the latest changes.Ben Howard
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-17upstart/cloud-init-nonet.conf: fix indentationScott Moser
2013-09-11fix read-versionScott Moser
2013-09-11Merged in upstream changes with disk partition supportBen Howard
2013-09-11Initial cut at disk partition support.Ben Howard
2013-09-11better checking and portability in read-dependencies and read-versionScott Moser
2013-09-11Add OpenNebula datasource.Scott Moser
This reads the context disk from OpenNebula.
2013-09-11merge from trunkScott Moser
2013-09-10add entry to changelogScott Moser
2013-09-11All fake util.find_devs_with set before try-finally sectionVlastimil Holer
2013-09-11Merged lp:~smoser/cloud-init/opennebulaVlastimil Holer
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-10Detect invalid system user for testVlastimil Holer
2013-09-10Update OpenNebula documentation (parseuser, more fs. labels, K-V single quotes)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".