Age | Commit message (Collapse) | Author |
|
no args are provided. Adjust the config file to use this
older method so that older changes aren't needed. Also
when calling 'initctl' emit fails log the exception message
so that some useful warning information can be produced.
|
|
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.
|
|
https://code.launchpad.net/~joev-n/cloud-init/altcloud-changes/+merge/116542
|
|
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.
|
|
the main function, which was usable for debugging maas was dropped during the
rework branch. I'm adding it back here as it is very useful. It is possibly
better implemented some other way than this, but this is good enough.
|
|
|
|
As described in the bug, enough non-cloud users experienced issues with
cloud-init selecting a mirror due to consumer level network providers using
dns server redirection.
We're turning this off by default.
LP: #974509
|
|
|
|
|
|
|
|
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'}
|
|
|
|
A previous commit of mine here tried to apply a trivial fix
to avoid a warning on empty content type. Instead, it made
the empty content type call a handler which did not exist.
This instead logs warning on unknown non-empty payload.
It logs debug on empty payload.
|
|
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)
|
|
|
|
|
|
during datasourceovf looking for a transport, the failed
mounts were having exceptions logged (triggering an unneccessary
warning also)
|
|
runparts output was being captured. This meant that output of user-scripts
was being captured and not sent to stdout (console).
|
|
This implements file writing via cloud-config. It also
* adjusts 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).
LP: #1012854
|
|
Adjust the examples file to reflect this.
|
|
|
|
happens first, which will examine the incoming encoding, and decide the
neccasary decoding types needed to get the final resultant string and
then use these normalized decoding types to actually do the final decode.
Also change the name of the config key that is looked up to 'write_files'
since 'files' is pretty generic and could have clashes with other modules.
Add an example that shows how to use this in the different encoding formats
that are supported.
|
|
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).
|
|
iterable which performs the same, but can handle iterator
types beyond those three.
|
|
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.
|
|
revno 584 broke logging. This fixes as it intended.
|
|
Show 3 decimal places for how long a resize took. 1 second granularity was
too large.
|
|
of a custom list that may confuse people trying to use this.
|
|
locked).
|
|
why we don't convert a string that is a filename to a string
buffer/io like object.
|
|
In 0.6.3, if one of the logging configs succeeded, then it was
just used. If it failed, it failed silently. This behavior was
expected, and desired.
As the code was here, we tried each log_cfg in the list anyway (possibly
using the last rather than the first) and writing a messgae including
'WARN' to stderr on failure of the log.
|
|
|
|
cc_rightscale_userdata.py is likely to not be found, so its WARN
was annoying in that it got to console output.
The same is true of url_helper. Not all uses of readurl were
fatal or justified to warn if the content was not there.
|
|
At this point there is a mixture of "double hash" cheetah comments and '#*'
cheetah comments.
|
|
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
|
|
Previously update_package_sources was a private class
(_update_package_sources). The apt_update_upgrade class called it.
It does make sense that things would want to call this independently
of installing packages. Therefore, expose it as a non hidden method.
|
|
|
|
|
|
|