summaryrefslogtreecommitdiff
path: root/cloudinit
AgeCommit message (Collapse)Author
2012-09-24Handle the case where 'user' is defined but 'users' isn't.Joshua Harlow
2012-09-24Update to bring inline with trunk/head.Joshua Harlow
2012-09-24Refactor the ug normalization to take in a distroJoshua Harlow
and produce a user and group list. Clean this up to be simpler as well as handle the old 'user' case when it exists in configuration.
2012-09-24cleanups for rhel network configJoshua Harlow
Rework the rhel sysconfig writing/updating so that it goes through a single function which helps ensure correctness. Also write to /etc/sysconfig/network when we have written out devices to ensure that networking is on.
2012-09-24fix pep8Scott Moser
2012-09-24Oopies, missed u.Joshua Harlow
2012-09-24Bring up to date with trunk.Joshua Harlow
2012-09-24handle ifup on RH distros by iterating over 'ifup devname'Joshua Harlow
Fix the ifup so that if a list of devices is provided then each interface is brought up individually instead of using the '--all' which isn't on rhel. The default debian behavior will be to use this still though as it overrides the new bring up interfaces function for this case.
2012-09-24DataSourceMAAS: if a oauth request fails due to 403 try updating local timeScott Moser
In the event of a 403 (Unauthorized) in oauth, try set a 'oauth_clockskew' variable. In future headers, use a time created by 'time.time() + self.oauth_clockskew'. The idea here is that if the local time is bad (or even if the server time is bad) we will essentially use something that should be similar to the remote clock. This fixes LP: #978127. LP: #978127
2012-09-24fix pylintScott Moser
2012-09-24fix make pep8Scott Moser
2012-09-24do not create 'sems' directory. 'sem' is proper instance/ pathScott Moser
2012-09-23Make the normalization a module level functionJoshua Harlow
since it has little dependence on the distros class itself. Readjust the using code to use this new module level function instead.
2012-09-22Use 0440 permissions on sudoers, not 0644Garrett Holmstrom
2012-09-21Fix some docs + pylint warnings + log on default created in the module.Joshua Harlow
2012-09-21Also allow the user list to come in as a commaJoshua Harlow
separated list so that its types match more of what the group list can be.
2012-09-211. Cleanup the user creation so that the distro class isJoshua Harlow
responsible only for creating users and groups and normalizing a input configuration into a normalized format that splits up the user list, the group list and the default user listsand let the add user/group config module handle calling those methods to add its own users/groups and the default user (if any). 2. Also add in tests for this normalization process to ensure that it is pretty bug free and works with the different types of formats that users/groups/defaults + options can take.
2012-09-20Instead of special casing the empty listJoshua Harlow
we are going to check for the 'all' entry and if that exists then only fire off one call (since debian supports this).
2012-09-19Use a common header creation functionJoshua Harlow
to avoid duplicating the same code in this file.
2012-09-19Rework the rhel sysconfig writing/updatingJoshua Harlow
so that it goes through a single function which helps ensure correctness. Also write to /etc/sysconfig/network when we have written out devices to ensure that networking is on.
2012-09-19Fix the ifup so that if a list of devices is providedJoshua Harlow
then each interface is brought up individually instead of using the '--all' which isn't on rhel. The default debian behavior will be to use this still though as it overrides the new bring up interfaces function for this case.
2012-09-19if a logged message fails, fallback to logging to stdoutJoshua Harlow
This most commonly occurs if a user-data script does '/sbin/poweroff' where syslog was being used. Once poweroff is invoked, syslog gets killed and logging would start to show stack traces. This generally tries to continue working instead, but log to stderr.
2012-09-19Get the fallback working.Joshua Harlow
2012-09-19add general signal handlersJoshua Harlow
A cloud-init job (user-data) might invoke /sbin/reboot or in some other way end up killing cloud-init. Rather than spewing the stack trace, we just print a nicer message.
2012-09-19do not disable logging on signalScott Moser
I had previously asked for this, but we're hoping to handle it in a more generic way. Just because we receive a signal doesn't mean that all logging is broken. The more general solution we'll chase is to catch a failure of a log message and fall back if necessary across the board. That way cloud-init will still send logging to the right places on a user interupt.
2012-09-19change exit messages to include signal nameScott Moser
2012-09-19Adding a dual fallback log handler thatJoshua Harlow
will be monkey patched in to replace the base handler. That patching isn't quite there yet but WIP.
2012-09-19fix 'update_package_sources' on rhel to only update package sourcesGarrett Holmstrom
update_package_sources on RHEL called "yum update", which actually upgrades packages on the system. Thix fix makes it instead call "yum makecache" instead.
2012-09-19Add the translation from the ubuntu format for nameservers and dns searchJoshua Harlow
servers and add in the writing of /etc/resolv.conf in rhel from that translation.
2012-09-19do not write a comment in /etc/hostname.Scott Moser
Network Manager (LP: #1053048), and apparently fedora/redhat do not like comments in this file. LP: #1052664
2012-09-19Actually download yum metadata with update_package_sourcesGarrett Holmstrom
2012-09-19write trailing newlines on generated filesScott Moser
This adds trailing newlines to /etc/default/locale, /etc/hostname, /etc/timezone.
2012-09-19Add support for 'selinux_user' key to useradd cloud-config syntaxGarrett Holmstrom
Fedora and RHEL and friends' useradd program supports an "--selinux-user" option that sets what SELinux user a new user should log in with. This commit introduces an "selinux-user" directive to cloud-config "users" lists that exposes this option.
2012-09-18Make update_package_sources stop upgrading packages on RHELGarrett Holmstrom
2012-09-18Add support for useradd --selinux-user''Garrett Holmstrom
2012-09-17Fill in basic info for the Fedora distroGarrett Holmstrom
2012-09-14Add a basic signal test and write out allJoshua Harlow
the signal information in one block instead of many.
2012-09-14only write landscape config if user-data providedScott Moser
2012-09-14Fix hostname derived from IP. (LP: 1050962)Andy Grimm
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-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-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-31fix pylint warningScott Moser