summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-09-13remove trailing whitespaceScott Moser
2012-09-13only emit if there is a device present.Scott Moser
2012-09-13add cloud-init-container.confScott Moser
This changes the way that we avoid cloud-init-nonet hanging in a container. Previously, under LP: #800824 we tried 'start networking', but that caused issues described in LP: #1031065. Here, we emit the net-device-added for any devices that have not yet been seen. LP: #1031065
2012-09-06Fix pylintness.Joshua Harlow
2012-09-06Add capturing of basic signal handlers toJoshua Harlow
handle those signals more gracefully and with better messaging than what comes builtin.
2012-09-06do not convert type None to string in cfgmnt.Scott Moser
LP: #1046946
2012-09-05add 'RUN=1' to /etc/default/landscape-clientThomas Hervé
This modifies /etc/default/landscape-client to have 'RUN=1' if and only if the cloud-config (user-data or local) was non-empty. LP: #1042758
2012-09-05Check if the config was specifiedThomas Hervé
2012-09-05Add RUN=1 to the default fileThomas Hervé
2012-09-01improvements for launch index, one fix for cloud-archiveJoshua Harlow
1. Docs for launch-index + examples 2. Tests for launch-index + data files 3. Fixing a bug with cloud-archive yaml types allowed (likes a tuple not a list for some reason) (LP: #1044594) 4. Setting the 'part' content-type if what we actually use is different. LP: #1044594
2012-09-01remove 'admin' group for ubuntu user, fix change passwordBen Howard
The admin group is deprecated in 12.04, so this removes the ubuntu user from that group (by default). The second change here is to fix the 'set_password' for the 'password' cloud-config. if 'password' is set in cloud_config, then * if 'users' is given, it applies to user[0] * if 'users' is not given, then it applies to the distro default user LP: #1044553
2012-08-31Fix pylint complaints.Joshua Harlow
2012-08-31Add some examples on how to use the new launch-indexJoshua Harlow
support in a cloud-archive format as well as a cloud-config format and explain how this will affect the final userdata available to an instance.
2012-08-311. Add a helper for tests to use to load resource/data files fromJoshua Harlow
2. Add a set of tests+data that ensure the launch index filtering works as expected in the various modes including raw yaml and via mime/email message formats.
2012-08-31When a parts content type is found to be different thanJoshua Harlow
its original content type said it is, make sure we set the new value, also unsure if the old top level message should have the same header (which will flip-flop).
2012-08-31Don't look into cloud-archive (after processing) for launchJoshua Harlow
indexes (since they will be handled beforehand) and fix the types being checked on the root of the archive format to be a tuple instead of a list (which oddly causes complaints).
2012-08-31Removed admin group from default Ubuntu user group list.Ben Howard
Fixed change password behavior to work with new user list handling (LP: #1044553)
2012-08-31support launch index specific user-dataJoshua Harlow
EC2 and openstack provide 'launch_index' in their metadata. This allows the user to specify cloud-config or multipart mime data that includes the 'Launch-Index' header. If launch index is available in the metadata service, then: * any part that contains a launch index other than the current launch-index of this instance will be ignored. * any part that does not contain a launch index will be considered as for this instance. If there is no such header, or launch_index is not available in the metadata service, then no such filtering will be done. LP: #1023177
2012-08-31usergroup related fixesScott Moser
- Converted user list to user dict to allow exclusion of the default user on Ubuntu systems via cloud-config (LP: #1041384). - Fixed bug with user creation on Ubuntu where the default user groups are not set properly (LP: #1044044). - Fixed documentation for user creation (LP: #1044508). LP: #1041384, #1044044, #1044508
2012-08-31incorrect example in docScott Moser
2012-08-31fix pylint warningScott Moser
2012-08-31- Converted user list to user dict to allow exclusion of the default userBen Howard
on Ubuntu systems via cloud-config (LP: #1041384). - Fixed bug with user creation on Ubuntu where the default user groups are not set properly (LP: #1044044). - Fixed documentation for user creation (LP: #1044508).
2012-08-31update systemd unit filesGarret Holmstrom
The systemd unit files are somewhat out of date. Fixes here include telling systemd to send stdout to a tty so it shows up in console output, updating the ways they call cloud-init, and disabling timeouts so cloud-config work doesn't get timed out after 90 seconds.
2012-08-29Don't use walk and handle the walking ourselves to Joshua Harlow
ensure that we recreate all child messages correctly if they also contain submessages, ensuring that we don't flatten the message list when we previously used walk.
2012-08-28fix busted cc_ssh_import_idScott Moser
2012-08-28distros/ubuntu.py: remove unused import (pylint)Scott Moser
2012-08-27For the userdata 'post-filtering' add in a new folder thatJoshua Harlow
can contain filters that serve this purpose only and add in the initial launch-index filter and replace the code in the datasource class that previously did this.
2012-08-27move user-groups section from cloud-config.txt to its own file.Scott Moser
move the section on user and group adds into doc/examples/cloud-config-user-groups.txt
2012-08-27fix bug preventing public_keys from being imported for to-be-created usersScott Moser
If a user hadn't been created in the image, when the public_key was to be injected by cc_ssh into the user's account, it didn't exist yet. This moves the population of the authorized_keys from the metadata service into user_groups, and puts that before cc_ssh runs. moving before cc_ssh means that when ssh comes up, the users will be ready. ssh-import-id then handles any ssh-import-id users after networking is up. LP: #1042459
2012-08-27clean up a bit, fix issue with missing 'log' argument to ssh_import_idsScott Moser
2012-08-27Fixed critical bug where user and group creation was being done after SSHBen Howard
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.
2012-08-27DataSourceEc2: require 'instance-data' as top level domainScott Moser
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
2012-08-27Update so that the content types searched for launch-indexJoshua Harlow
variable has a little more meaning and by default look in metadata for 'launch-index' and have ec2 instead look for a different variable (thus allowing more datasources to just work).
2012-08-26Ensure when an archive is exploded and if it contains theJoshua Harlow
'launch-index' key that we copy that key over to the right header (which will then be used later when assigning the 'real' header when the message is attached)
2012-08-26Fix tests running and add in a check on the content typeJoshua Harlow
before we look into the payload as well as make the skip test a function that the datasource module can also use.
2012-08-26Don't use the processed userdata if nothing is there.Joshua Harlow
2012-08-26Add the capability to understand and filter onJoshua Harlow
userdata based on a launch-index (or leave userdata alone if none is provided by the datasource). This works by doing the following. 1. Adjusting the userdata processor to attempt to inject a "Launch-Index" header into the messages headers (by either taking a header that already exists or by looking into the payload to see if it exists there). 2. Adjust the get_userdata ds function to apply a filter on the returned userdata (defaulting to false) that will now use the datasources get_launch_index value to restrict the 'final' message used in consuming user data (the same behavior if not existent). 3. Further down the line processes that use the 'resultant' userdata now will only see the ones for there own launch index (ie cloud-config will be restricted automatically and so on) and are unaffected (although they can now ask the cloud object or the datasource for its launch index via the above new ds method.
2012-08-24add support for the config-drive-v2 datasourceScott Moser
config-drive-v2 was implemented in openstack at https://review.openstack.org/#/c/11184/ . This adds support to cloud-init for reading that. LP: #1037567
2012-08-24add changelog entryScott Moser
2012-08-24fix test case for copy of uuid -> instance-idScott Moser
2012-08-24use openstack metadata version 2012-08-10 unless not availableScott Moser
If 'latest' is found, but '2012-08-10' is not, we will log a warning but attempt to use it.
2012-08-24use instance-id, not previous-instance-id.Scott Moser
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.
2012-08-24use 'uuid' as 'instance-id'Scott Moser
openstack metadata uses 'uuid' as an instances 'instance-id'. just copy that to the metadata['instance-id']
2012-08-24committing in preparation for actual testScott Moser
2012-08-23some more tests.Scott Moser
2012-08-23fix pep8 and pylintScott Moser
2012-08-23initial functional unit testScott Moser
2012-08-22add support for creating initial users and groupsScott Moser
Added "userless" mode to cloud-init for handling the creation of the users and the default user on Ubuntu. The end goal of this is to remove the need for the 'ubuntu' user in the cloud images and to allow individuals to choose the default user name. LP: #1028503
2012-08-22cc_ssh.py: add the "get user zero" logic, disable root even if no userScott Moser
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.
2012-08-22do not attempt the useradd command if user existsScott Moser
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)