Age | Commit message (Collapse) | Author |
|
There are several changes here.
* Datasource now has a 'availability_zone' getter.
* get_package_mirror_info
* Datasource convenience 'get_package_mirror_info' that calls
the configured distro, and passes it the availability-zone
* distro has a get_package_mirror_info method
* get_package_mirror_info returns a dict that of name:mirror
this is to facilitate use of 'security' and 'primary' archive.
* this supports searching based on templates. Any template
that references undefined values is skipped. These templates
can contain 'availability_zone' (LP: #1037727)
* distro's mirrors can be arch specific (LP: #1028501)
* rename_apt_lists supports the "mirror_info" rather than single mirror
* generate_sources_list supports mirror_info, and as a result, the
ubuntu mirrors reference '$security' rather than security (LP: #1006963)
* remove the DataSourceEc2 specific mirror selection, but instead
rely on the above filtering, and the fact that 'ec2_region' is only
defined if the availability_zone looks like a ec2 az.
|
|
|
|
|
|
see LP: #1039303 for more information. Hopefully we'll get a good
fix there.
|
|
This fixes the column headers and and adds a check to make sure that a key
given is one that we actually want to print out. Also add in a config
option which lets people select a different hashing method (not md5 if
they want).
|
|
The None datasource is the last resort fallback datasource. It is
identifiable by a property 'is_disconnected' that indicates that the
datasource used is "not connected to a datasource".
This will allow any thing that needs to run to still run in the absense
of a DataSource.
Also, we add a logging of the datasource found in final_message, and
a warning if the None datasource is found.
LP: #906669
|
|
Example output:
ci-info: +---------+-------------------------+---------+-----------------+
ci-info: | Keytype | Fingerprint (md5) | Options | Comment |
ci-info: +---------+-------------------------+---------+-----------------+
ci-info: | ssh-rsa | e3:..:84:81:72:38:..:6a | - | smoser@brickies |
ci-info: | ssh-rsa | 21:..:32:8a:da:98:..:42 | - | smoser@bart |
ci-info: | ssh-rsa | 7b:..:ac:a7:17:51:..:b2 | - | smoser@kaypeah |
ci-info: +---------+-------------------------+---------+-----------------+
|
|
add in the ability to use any fallback userdata
or metadata found in the datasource config (if provided).
|
|
sure that a key given is one that we actually
want to print out. Also add in a config option
which lets people select a different hashing
method (not md5 if they want).
|
|
1. This will allow a basically empty datasource to be
activated (as the last datasource) when no other
datasources work. This allows modules to still
run (if they can, new function added to the datasource
if modules want to check if cloud-init is in this
'disconnected' state).
|
|
1. Adjust the sshutil so that it has functions
for doing this (used by the previous functions)
2. Create a new module that pretty prints out
the given authorized keys fetched (if any) using the standard
md5 scheme (for now), this module can be disabled by
setting 'no_ssh_fingerprints' or just removing it from the running
list.
|
|
These changes add a new data source to cloud-init to support passing user
data to RHEVm and vSphere. The user data is passed to RHEVm v3.0 (current
version) using a floppy injection hook and to vSphere via cdrom device.
RHEVm v3.1 will use a method similar to vSphere. Once available support
for that is also expected.
|
|
https://code.launchpad.net/~joev-n/cloud-init/altcloud-changes/+merge/116542/comments/255564
https://code.launchpad.net/~joev-n/cloud-init/altcloud-changes/+merge/116542/comments/255565
|
|
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.
|