Age | Commit message (Collapse) | Author |
|
|
|
|
|
configurations were applied. The result of this bug was that cloud-config
supplied SSH public keys would fail to apply since the configured user
may or may not exist. (LP: #1042459).
cloudinit/config/cc_ssh_import_id.py:
ssh_import_id.py now handles all user SSH import IDs.
cloudinit/distros/ubuntu.py:
Removed create_user class override as cruft, since ssh_import_id
now handles all users.
config/cloud.cfg:
Moved users_groups to run under cloud_init_modules.
doc/examples/cloud-config.txt:
Added missing documentation on user and group creation.
|
|
In searching for the metadata service, require 'instance-data' to be at the top
level domain. Previously any misconfigured 'search' in /etc/resolv.conf could
result in unintended use of a metadata server.
LP: #1040200
|
|
If 'latest' is found, but '2012-08-10' is not, we will log a warning
but attempt to use it.
|
|
at the point where we are getting the previous instance id, there
cloud-init hasn't performed the move yet. Therefore, the "previous"
is the one that /var/lib/cloud/data/ says is the current.
|
|
openstack metadata uses 'uuid' as an instances 'instance-id'.
just copy that to the metadata['instance-id']
|
|
|
|
|
|
|
|
|
|
cc_ssh.py was getting user of None, which ended up with a root user
not getting ssh keys updated. That was bad. So, I duplicated the
"get user zero" code that appeared other places here.
Then, we disable the root user even if there is not a user. In that
case we just use the string "NONE" in the disable message.
|
|
Previously we were only logging that the user existed
and then still trying to run the command (which would raise error)
As a result, none of the rest of the things would be done (sshimport id and
such)
|
|
|
|
Fix bug here:
adduser_cmd = ['useradd', name]
x_adduser_cmd = adduser_cmd
is different than
x_adduser_cmd = ['useradd', name]
The problem was they referenced the same list, and we were doubly appending.
|
|
|
|
|
|
In an effort to pylint errors about NonImlementedError and
add_default_user, I moved this method to distro and genericized it.
Now, assuming a sane 'create_user' for the distro, this should work.
Also:
* removed the unused set_configured_user method
|
|
|
|
|
|
password control code
|
|
Fix the userdata being populated to a dict (incorrect)
and let it instead be populated by the userdata processor
with the raw userdata (either empty or datasource config
provided).
|
|
If an upgrade or package installation forced a reboot (such as a kernel
upgrade), then we can optionally reboot at that point.
This allows the user to not be into the newest available kernel without
needing a reboot on their own.
LP: #1038108
|
|
instead of substituting and then checking for presense of a unlikely to
occur string, this only adds to the search list if there is no KeyError
raised.
|
|
|
|
|
|
make pep8 now is silent on precise's pep8 ( 0.6.1-2ubuntu2).
|
|
and let it instead be populated by the userdata processor
with the raw userdata (either empty or datasource config
provided).
|
|
|
|
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
|
|
command to use log options over short
|
|
users and the default user on Ubuntu.
cloudinit/config/cc_users_groups.py: new cloud-config module for creating
users and groups on instance initialization.
- Creates users and group
- Sets "user" directive used in ssh_import_id
cloudinit/config/cc_ssh_import_id.py: module will rely upon users_groups
for setting the default user. Removed assumption of 'ubuntu' user.
cloudinit/distros/__init__.py: Added new abstract methods for getting
and creating the default user.
cloudinit/distros/ubuntu.py: Defined abstract methods for getting and
and creating the default 'ubuntu' user on Ubuntu instances.
cloudinit/util.py: Added ability to hide command run through util.subp to
prevent the commands from showing in the logs. Used by user_groups
cloud-config module.
config/cloud.cfg: Removed "user: ubuntu" directive and replaced with new
user-less syntax.
doc/examples/cloud-config.txt: Documented the creation of users and groups.
|
|
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.
|