Age | Commit message (Collapse) | Author |
|
In an effort to make the EC2 Datasource's search under ec2.archive.ubuntu.com
resilient against dns redirection, we add some code to is_resolvable.
One future enhancement for this would be to protect against server side
round robin results. Ie, if 'bogus-entry' returned 10.0.1.1 one time, and then
10.0.1.2 a second time. We could check if results where within the same 3
octets, and assume invalid if they were.
|
|
This does 2 things:
a.) fixes broken logic in 'close_stdin'
previously _CLOUD_INIT_SAVE_STDIN had to be set to false to
preserve stdin. "save_stdin" should be true to indicate it
should be saved.
The net result is that you can stuff just add
import pdb; pdb.set_trace()
to code, and then run something like:
sudo _CLOUD_INIT_SAVE_STDIN=1 _CLOUD_INIT_SAVE_STDOUT=1 \
cloud-init single --name=mounts --frequency=always
And enter the debugger even if you had a 'output' that would redirect
stdin/out by default, like:
output: {all: '| tee -a /var/log/cloud-init-output.log'}
|
|
the problem sovled here is that most callers of yaml_load do not pass
'None' as a allowed type. I didn't want to change all the callers.
If the yaml.safe_load ended up being None we were raising a TypeError
and that was getting logged (meaning output to console). Even though
the this was not really bad.
So, if the type is not in the list, *and* it is not empty, then log
exception. If it in the list and empty, just debug.
empty input was occurring when cloud-config was empty (no user-data)
|
|
runparts output was being captured. This meant that output of user-scripts
was being captured and not sent to stdout (console).
|
|
other code to have user/group parsing in util instead
of in stages.py, renames decomp_str to decomp_gzip since
it is more meaningful when named that (as thats all it can
decompress).
|
|
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.
|
|
of a custom list that may confuse people trying to use this.
|
|
are provided and rethrow it as a OSError (which seems reasonable) and adjust
its usage in the log file touching/permission modification stage to catch
this error and log it.
|
|
On my system (quantal) this 'make pylint' does not complain now.
|
|
This returns the check for an archive mirror in the DataSourceEc2 to
only do so by DNS resolution. The 'rework' branch had made the check
wait and timeout on attempts to reach the mirror. This resulted
in 120 seconds of waiting before failure.
For now, just go back to the old situation of checking by dns.
|
|
of failing)
|
|
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
|
|
|
|
2. Move the config loading functions to where they are used (in stages)
3. Adjust cc_set_passwords to use the is_true and is_false renamed functions
4. Adjust the init stage to have a _read_base_config function used to load
the base 'initial' configuration from the following locations
a. Kernel cmdline
b. Conf.d location (+ the cloud.cfg location)
c. Built-in configuration
|
|
useful in certain cases
|
|
1. Adjust the test_util after this mocking to be cleaner
|
|
|
|
|
|
aren't very meaningful)
|
|
|
|
2. Add a abs path joining function that will return the absolute path of
a combined path (where applicable)
|
|
|
|
a. Instead of executing a bash string, write out a temporary file
and then just execute '/bin/sh' on that file with the right arguments instead.
2. Rename util.SilentTemporaryFile to util.ExtendedTemporaryFile and update the usages
of the previous name accordingly, this better reflects what this temp file is.
3. More teenie pep8 line length fixings
|
|
|
|
2. For reading config from conf.d, collect all the configs
then call the mergemany function
|
|
useful to restore, fix test to work with selinux enabled sysystems
|
|
2. Update the mount point adding of '/' to just add it in one place if it does not already exist
|
|
|
|
|
|
|
|
2. Seperate config loading from the actual final 'merging' process.
a. A util function will now merge multiple config dictionaries after they have all been loaded instead of
loading and merging at the same time, which can get confusing to follow.
|
|
2. Move the cloudinit util function that writes the command line url to a file to here.
|
|
2. Fixup of merge dict after found out that it depends on the src return for non dict types
3. Only merge kernel config if there was any kernel config
|
|
a. This allows for more properties to be added as needed in the future, instead of being very restrictive.
2. Fix up all uses of the url reading to now use this new response object.
3. Also fixup user data including, such that if no response actual occurs the url content is not further processed.
|
|
|
|
options (if any provided/selected)
|
|
cleaning them.
|
|
|
|
given mode.
2. Adjust the usage of items() to iteritems() which will help translation to python 3.
|
|
|
|
1. Adjustments to using more selinux guards around directory creation, chmod...
2. Adding util functions to check if values are false or true (used internally and externally)
3. Move find_devs_with to util.py and allow it to serve multiple use cases
4. Add fork_cb which will fork a process and then call a certain callback (used right now by the resize nonblocking mode)
5. Move functions that performed time_rfc2822 time fetching and uptime fetching to here.
6. Allow the subp util function to act in shell mode
7. Increase logging usefulness in shellify function
|
|
Adjust usage of logexc to use that in the utils file for exceptions that occur.
Add in more options to sub function to capture outputs, shell mode and such.
|
|
|
|
cleanups.
|
|
|
|
|
|
|
|
LP: #942061
|
|
|
|
|