summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-09-20Use only util methods for reading/loading/appending/peekingJoshua Harlow
at files since it is likely soon that we will add a new way of adjusting the root of files read, also it is useful for debugging to track what is being read/written in a central fashion.
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-19doc: document 'tags' as comma delimited stringsScott Moser
LP: #1042764
2012-09-19First thing that we do after we can start importingJoshua Harlow
is to patch the functionality before it gets reimported.
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-19remove unit test.Scott Moser
the unit test required access to /dev/console due to the logging.
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-19fix incorrect ubuntu mirror locations for 'ports'Robie Basak
2012-09-19Fix ports.ubuntu.com mirror locationsRobie Basak
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-14Cleanup pylint warnings.Joshua Harlow
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 based on IP generation.Andy Grimm
LP: #1050962
2012-09-14remove 'start networking' from cloud-init-nonetScott Moser
do not 'start networking' in cloud-init-nonet, but add cloud-init-container job that runs only if in container and emits net-device-added (LP: #1031065) LP: #1031065
2012-09-14Fix hostname derived from IP. (LP: 1050962)Andy Grimm
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.