summaryrefslogtreecommitdiff
path: root/bin
AgeCommit message (Collapse)Author
2014-07-15Add more useful execution continuing messageJoshua Harlow
2014-03-03version space (v1:) result_path json alsoScott Moser
2014-02-25be atomic when writing status filesScott Moser
2014-02-24fix write_json callScott Moser
2014-02-24minor cleanupsScott Moser
2014-02-24fixes from testing, force symlinkScott Moser
2014-02-24possibly functional start testingScott Moser
2014-02-20initial commit for statusScott Moser
2014-01-08Significant re-working of the userdata handling and introduction ofBen Howard
vendordata. Vendordata is a datasource provided userdata-like blob that is parsed similiarly to userdata, execept at the user's pleasure. cloudinit/config/cc_scripts_vendor.py: added vendor script cloud config cloudinit/config/cc_vendor_scripts_per_boot.py: added vendor per boot cloud config cloudinit/config/cc_vendor_scripts_per_instance.py: added vendor per instance vendor cloud config cloudinit/config/cc_vendor_scripts_per_once.py: added per once vendor cloud config script doc/examples/cloud-config-vendor-data.txt: documentation of vendor-data examples doc/vendordata.txt: documentation of vendordata for vendors (RENAMED) tests/unittests/test_userdata.py => tests/unittests/test_userdata.py TO: tests/unittests/test_userdata.py => tests/unittests/test_data.py: userdata test cases are not expanded to confirm superiority over vendor data. bin/cloud-init: change instances of 'consume_userdata' to 'consume_data' cloudinit/handlers/cloud_config.py: Added vendor script handling to default cloud-config modules cloudinit/handlers/shell_script.py: Added ability to change the path key to support vendor provided 'vendor-scripts'. Defaults to 'script'. cloudinit/helpers.py: - Changed ConfigMerger to include handling of vendordata. - Changed helpers to include paths for vendordata. cloudinit/sources/__init__.py: Added functions for helping vendordata - get_vendordata_raw(): returns vendordata unprocessed - get_vendordata(): returns vendordata through userdata processor - has_vendordata(): indicator if vendordata is present - consume_vendordata(): datasource directive for indicating explict user approval of vendordata consumption. Defaults to 'false' cloudinit/stages.py: Re-jiggered for handling of vendordata - _initial_subdirs(): added vendor script definition - update(): added self._store_vendordata() - [ADDED] _store_vendordata(): store vendordata - _get_default_handlers(): modified to allow for filtering which handlers will run against vendordata - [ADDED] _do_handlers(): moved logic from consume_userdata to _do_handlers(). This allows _consume_vendordata() and _consume_userdata() to use the same code path. - [RENAMED] consume_userdata() to _consume_userdata() - [ADDED] _consume_vendordata() for handling vendordata - run after userdata to get user cloud-config - uses ConfigMerger to get the configuration from the instance perspective about whether or not to use vendordata - [ADDED] consume_data() to call _consume_{user,vendor}data cloudinit/util.py: - [ADDED] get_nested_option_as_list() used by cc_vendor* for getting a nested value from a dict and returned as a list - runparts(): added 'exe_prefix' for running exe with a prefix, used by cc_vendor* config/cloud.cfg: Added vendor script execution as default tests/unittests/test_runs/test_merge_run.py: changed consume_userdata() to consume_data() tests/unittests/test_runs/test_simple_run.py: changed consume_userdata() to consume_data()
2013-07-30set reading /proc/uptime to false by default.Scott Moser
reading /proc/uptime is going to be slower, and no reason to do it on most things. Better to only do it when you suspect maybe a need for it.
2013-07-30add util.log_time helperScott Moser
The reason for this is that more and more things I was wanting to be able to see how long they took. This puts that time logic into a single place. It also supports (by default) reading from /proc/uptime as the timing mechanism. While that is almost certainly slower than time.time(), it does give millisecond granularity and is not affected by 'ntpdate' having run in between the two events.
2012-09-19if a logged message fails, fallback to logging to stdoutJoshua Harlow
This most commonly occurs if a user-data script does '/sbin/poweroff' where syslog was being used. Once poweroff is invoked, syslog gets killed and logging would start to show stack traces. This generally tries to continue working instead, but log to stderr.
2012-09-19First thing that we do after we can start importingJoshua Harlow
is to patch the functionality before it gets reimported.
2012-09-06Add capturing of basic signal handlers toJoshua Harlow
handle those signals more gracefully and with better messaging than what comes builtin.
2012-08-09Move the code that did the 'cloud-config' upstart event name emitting to Joshua Harlow
a config module and make it more generic in that it can take in a list of event names to emit as arguments. Add a yaml example to replace the functionality removed from the main binary.
2012-07-26emit the cloud-config event againScott Moser
The merge of 0.7.0 dropped the cloud-config initctl emission. I've added it back here, but done so in a way that doesn't force non-ubuntu (or non-upstart) distros to provide this config setting to disable it. LP: #1028674
2012-07-10Change the welcome message to be slightly differentJoshua Harlow
when running in local mode vs non-local mode, which is useful when tracking what is happening in the console and in the logs that are written out later.
2012-07-10re-setup logging to address cloud-config changes input via user-dataScott Moser
If the user has input logging information in user-data cloud-config we want to set up the logging to accept that after the data source has been read.
2012-07-10send welcome message after logging has been appliedScott Moser
in the 'cloud-init init' stages, we want the welcome message to get to the correct output as specified by the system's configuration. Ie, if the local /etc/cloud.config.d had 'output' or 'log_cfg' settings we want those to be able to affect the welcome message also. In normal operation, nothing else will go to stdout or stderr before this, and likely/hopefully nothing terribly important to the logs.
2012-07-09cloud-init: do not warn on failure to find local datasourceScott Moser
Instead of a warning, only debug this message. Warnings get to console and look scary to users.
2012-07-09Revert back to using cheetah + adjust resultant code + templatesJoshua Harlow
At this point there is a mixture of "double hash" cheetah comments and '#*' cheetah comments.
2012-07-021. Move the welcome message template string to a constant at the top of the ↵Joshua Harlow
module 2. Fix the usage of multi_log to log to only one of the places (for now) 3. Update comment about multi-log and why write_file isn't used in this case
2012-07-01Add a multi log function that can write to stderr, console and a log debug, ↵Joshua Harlow
useful in certain cases
2012-06-29If logging hasn't been enabled via '--debug' at least log the exceptions ↵Joshua Harlow
that occur to stderr.
2012-06-29Add a force option which will allow users to continue running when no ↵Joshua Harlow
datasource is found.
2012-06-29Fix the datasource not being fetched in single running mode.Joshua Harlow
2012-06-29Add a message about why the second consume_userdata occurs since its not ↵Joshua Harlow
very obvious.
2012-06-281. Update with smosers code review and comments (and put some of those ↵Joshua Harlow
comments into the files) 2. Rename consume() to consume_userdata() as it helps in figuring out what this does. 3. Fixup the tests due to #2
2012-06-27No longer need to do this special config appending, the config merger class ↵Joshua Harlow
handles this.
2012-06-221. Return which modules ran from the run module functionharlowja
2. Use that list in the main binary & adjust related comparisions
2012-06-21Ensure that nothing was ran by checking the total countharlowja
2012-06-211. Move all info() logging methods to debug() harlowja
2. Adjust comment on sources list from depends 3. For the /etc/timezone 'writing', add a header that says created by cloud-init
2012-06-201. Shorten the passed in name for frequency (and expand it later)Joshua Harlow
2. For single modules, if it doesn't run, print a warning and exit with a return code of 1
2012-06-20No need for this now that we have the imports done correctlyJoshua Harlow
2012-06-20Massive pylint + pep8 fixups!Joshua Harlow
2012-06-201. Use the name modules where transforms was usedJoshua Harlow
2. Reflect the move back to config 'modules' in the other cli options 3. Have the single mode not need to lookup the module but use the general import path
2012-06-20Remove the .py extension for this new main program binary.Joshua Harlow
2012-06-20Add message about query not being implemented yet.Joshua Harlow
2012-06-20Removed the older binaries, now supplemented by a unified binary.Joshua Harlow
2012-06-20Make the single run mode setup the output redirection and logging accordinglyJoshua Harlow
2012-06-19Get single module running mode mostly working (still needs a little work).Joshua Harlow
2012-06-19Pylint cleanups.Joshua Harlow
2012-06-191. Move the running of transforms to a common function that returns how a ↵Joshua Harlow
useful exit code 2. Add in the single transform running stub, which seems to be a feature of the previous cloud-init-cfg, making it its own action now 3. Adding in the 'config' and 'final' actions, which now both go through the same entrypoint function to setup the initial object and then fire off the needed transforms. 4. Cleanup of the argparsing code to handle the above cases.
2012-06-191. Use the help message to show the defaultJoshua Harlow
2. Add a mode option in to the 'config' subparser that allows the user to affect the transform selection phase 3. Some tiny pylint warnings.
2012-06-19Get the 'init' stage working.Joshua Harlow
2012-06-19Small logging changes.Joshua Harlow
2012-06-19Passed along the extra config pathsJoshua Harlow
2012-06-191. Continue working on main 'init' methodJoshua Harlow
2. Add the ability to take in multiple extra config files (mainly for debugging) 3. Move 'simple' welcome message to this file 4. Only setup initial basic logging if '-d' option is provided.
2012-06-181. Initial work on a unified program that will call into the new libraries.Joshua Harlow
Main features: 1. Use of argparse + subcommands to handle 'action' specific actions a. Actions being 'query', 'init', 'final', 'config' !WIP!
2012-06-07Move binaries to an actual binary dir.Joshua Harlow