summaryrefslogtreecommitdiff
path: root/cloudinit
AgeCommit message (Collapse)Author
2012-01-12[PATCH 10/13] Fix pylint warnings W0102 (dangerous default value asScott Moser
From: Juerg Haefliger <juerg.haefliger@hp.com> argument)
2012-01-12[PATCH 09/13] Fix pylint warnings W0107 (unnecessary pass statement)Scott Moser
From: Juerg Haefliger <juerg.haefliger@hp.com>
2012-01-12[PATCH 08/13] Fix pylint warnings W0104 (statement seems to have noScott Moser
From: Juerg Haefliger <juerg.haefliger@hp.com> effect)
2012-01-12[PATCH 07/13] Fix pylint warnings W0622 (redefining built-in 'xyz')Scott Moser
From: Juerg Haefliger <juerg.haefliger@hp.com>
2012-01-12[PATCH 06/13] Fix pylint warnings W0612 (unused variable)Scott Moser
From: Juerg Haefliger <juerg.haefliger@hp.com>
2012-01-12[PATCH 05/13] Fix pylint warnings W0613 (unused argument)Scott Moser
From: Juerg Haefliger <juerg.haefliger@hp.com>
2012-01-12[PATCH 04/13] Fix pylint warnings W0611 (unused import)Scott Moser
From: Juerg Haefliger <juerg.haefliger@hp.com>
2012-01-12[PATCH 03/13] Fix pylint warnings W0301 (unnecessary semicolon)Scott Moser
Juerg Haefliger <juerg.haefliger@hp.com>
2012-01-12[PATCH 02/13] Fix pylint warnings W0312 (found indentation with tabsScott Moser
instead of spaces) From: Juerg Haefliger <juerg.haefliger@hp.com>
2012-01-12[PATCH 01/13] Fix pylint warnings W0311 (bad indentation)Scott Moser
From: Juerg Haefliger <juerg.haefliger@hp.com>
2012-01-12fix selection of ec2 mirrors when inside ec2.Scott Moser
LP: #915282
2012-01-10fix invalid variable name in cloudinit/CloudConfig/cc_resizefs.pyScott Moser
2012-01-09run resizefs module on every bootScott Moser
on EC2, you can: stop instance resize root volume start instance Currently, the partition would get grown correctly in the initramfs, but the root filesystem will not get automatically resized in that case as it only runs per_instance. This should not be harmfull in any case, as resizefs will just report nothing to do: $ sudo resize2fs /dev/sda5 resize2fs 1.42-WIP (16-Oct-2011) The filesystem is already 25600278 blocks long. Nothing to do!
2011-12-22fix issue with part-handlers and base64 encoding (LP: #874342)Scott Moser
Previously, * if content came into cloud-init for processing came in via a multipart mime file, and was already base64 encoded, it would get base64 encoded again before being handed to a part-handler. * if it came in via a '#include'd file then it would not be encoded at all. This drops the internal 'parts' array, that was just converted to and then from. Instead, we keep MIME format throughout and keep headers along the way. That means that a message that comes in with 'Content-Transfer-Encoding' set to 'base64' will be decoded before being handed to a part-handler. It also reduces the chance of failure due to content appearing to be an actual email. Previously if content contained colon separated fields, it might be read as headers (email.message_from_string(open("/etc/passwd","r")) would come back as all headers, no payload) The weak point right now is that '#include'd data cannot have mime types associated with it (unless it is a mime formatted content). I had hoped to read user headers and possibly set 'Content-Type' from that. LP: #874342
2011-12-22fix issue with multiple content-typesScott Moser
2011-12-22fix issue with part-handlers and base64 encoding (LP: #874342)Scott Moser
Previously, * if content came into cloud-init for processing came in via a multipart mime file, and was already base64 encoded, it would get base64 encoded again before being handed to a part-handler. * if it came in via a '#include'd file then it would not be encoded at all. This drops the internal 'parts' array, that was just converted to and then from. Instead, we keep MIME format throughout and keep headers along the way. That means that a message that comes in with 'Content-Transfer-Encoding' set to 'base64' will be decoded before being handed to a part-handler. It also reduces the chance of failure due to content appearing to be an actual email. Previously if content contained colon separated fields, it might be read as headers (email.message_from_string(open("/etc/passwd","r")) would come back as all headers, no payload) The weak point right now is that '#include'd data cannot have mime types associated with it (unless it is a mime formatted content). I had hoped to read user headers and possibly set 'Content-Type' from that.
2011-12-21fix bug where first entry in the list presented to mergeTogether was ignoredScott Moser
2011-12-20support configuration of landscape-client via cloud-config (LP: #857366)Scott Moser
This adds the ability to configure landscape client code from cloud-config. The fields available are those that were populated to /etc/landscape/client.conf when I ran landscape-config on precise ('11.07.1.1-0ubuntu2')
2011-12-20remove unused cloudinit/execute.pyScott Moser
2011-12-20add INSTANCE_ID to environment of bootcmd scriptsScott Moser
2011-12-20output public ssh host keys to console on boot (LP: #893400)Scott Moser
Currently cloud-init writes something like this to console output: ec2: ############################################################# ec2: -----BEGIN SSH HOST KEY FINGERPRINTS----- ec2: 2048 78:ae:f3:91:04:6f:8d:ee:ef:e1:2d:72:83:6a:d0:82 root@h (RSA) ec2: 1024 d3:b6:32:64:22:d4:43:05:f9:25:b4:f3:65:4e:e2:51 root@h (DSA) ec2: -----END SSH HOST KEY FINGERPRINTS----- ec2: ############################################################# the key fingerprints are useful for humans to read, but not so useful for machines, as you cannot populate a KnownHostsFile (~/.ssh/known_hosts) from the data there. This change adds output like: -----BEGIN SSH HOST KEY KEYS----- ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdH......STI= root@h ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYRIQe6m......tWF3 root@h -----END SSH HOST KEY KEYS----- Those lines can easily be grabbed and appended to a known_hosts file.
2011-12-19revert default handling of /etc/hosts to 0.6.1 style (Ubuntu 11.04)Scott Moser
The default management of /etc/hosts in 0.6.2 (Ubuntu 11.10) was problematic for a couple different uses, and represented a change in what was present in previous releases. This changes the default behavior back to the way it was in 11.04/0.6.1. It makes 'manage_etc_hosts' in cloud-config more than just a boolean. It can now have 3 values: * False (default): do not update /etc/hosts ever * "localhost": manage /etc/hosts' 127.0.1.1 entry (the way it was done in 11.10/0.6.2) * True (or "template"): manage /etc/hosts via template file This addresses bugs * LP: #890501 * LP: #871966
2011-12-19make stdin read from /dev/null for all cloud-init programs (LP: #903993)Scott Moser
the cloud-init programs are never intended to run interactively. Some programs were being run via subprocess, and would notice that their input was attached to a terminal (/dev/console). As a result, they they would try to prompt the user for input (apt-add-repository) This change simply re-opens standard input as /dev/null so any subprocesses will not end up blocking on input.
2011-12-19make DataSourceEc2 more resilliant to slow metadata service (LP: #894279)Scott Moser
This increases the timeout for a metadata request to something that should be easily satisfiable (50 seconds). But hopefully does so while still keeping the case of no-metadata service in mind. Previously, there was a small timeout and many retries (30) would be done. Now, - larger timeout (50 seconds) by default - retry until a given "max_wait" is reached (120 seconds default) The end result is that if we're hitting the timeout, there will only end up being a couple attempts made. But if the requests are coming back quickly then we'll still make several attempts. There is one EC2DataSource config change, now 'retries' is not used, but rather 'max_wait' to indicate generally how long it should try to find a metadata service.
2011-12-18cloudinit/DataSourceEc2: use util.is_resolvable_urlScott Moser
2011-12-16remove trailing :: on apt config for proxyScott Moser
2011-12-16add apt_proxy supportScott Moser
2011-12-16use the distro when searchingScott Moser
instead of only searching ubuntu.localdomain, search <distro>-mirror.localdomain
2011-12-16only use apt_mirror if it is non-emptyScott Moser
if apt_mirror was set to "" or False in the config, we would have used that.
2011-12-16fix issue if apt_mirror is provided in configScott Moser
2011-12-16replace a print with a log.debugScott Moser
2011-12-16merge trunkScott Moser
2011-12-16DataSource: fix is_ipv4 usageScott Moser
2011-12-16initial mirror configuration/discoveryScott Moser
2011-12-16move logic of "is this an ipv4 address" to a function is_ipv4Scott Moser
2011-11-30do not convert 'None' to a string in cloud-config mounts input.Scott Moser
input like: mounts: - [ ephemeral0, /opt , auto, "defaults,noexec" ] - [ swap, null ] would get interpreted as string "None" rather than "None" and an entry for swap would be written to fstab. LP: #898365
2011-10-31use hashlib rather than md5 module to avoid deprecation warning.Scott Moser
Thanks: Garrett Holmstrom LP: #883367
2011-10-31fix bug in netinfo.debug_info if no network devices availableScott Moser
LP: #883367
2011-10-31make ssh service name configurableScott Moser
Fedora's ssh service name is named 'sshd', Ubuntu's is 'ssh'. This makes that configurable. TODO: document ssh_svcname. taken from git://pkgs.fedoraproject.org/cloud-init.git commit 87f33190f43d2b26cced4597e7298835024466c2 Author: Garrett Holmstrom <gholms@fedoraproject.org> Patch11: cloud-init-0.6.2-sshsvc.patch
2011-10-31make ssh host key deletion configurableScott Moser
Garret's patch cloud-init-0.6.2-sshsvc.patch did 2 separate things. This hunk makes deletion of keys configurable, and then makes generation of the keys only done if the key does not exist. TODO: document ssh_genkeytypes. taken from git://pkgs.fedoraproject.org/cloud-init.git commit 87f33190f43d2b26cced4597e7298835024466c2 Author: Garrett Holmstrom <gholms@fedoraproject.org> Patch11: cloud-init-0.6.2-sshsvc.patch
2011-10-30Make the types of SSH keys to generate configurableScott Moser
Notes: * This also makes cc_ssh.py *not* write ssh keys to the console. That means that if keys-to-console is configured off, nothing will write the keys to the console. * I removed Garret's use of xargs, replacing with a shell for loop in write-ssh-key-fingerprints. taken from git://pkgs.fedoraproject.org/cloud-init.git commit 87f33190f43d2b26cced4597e7298835024466c2 Author: Garrett Holmstrom <gholms@fedoraproject.org> Patch8: cloud-init-0.6.2-sshkeytypes.patch
2011-10-30add a warning if there is no known way to enable puppet service.Scott Moser
2011-10-30Make enabling puppet service work on FedoraScott Moser
configure puppet service to start on fedora based on one of: * presence of /etc/default/puppet (Ubuntu) * /bin/systemctl * /sbin/chkconfig taken from git://pkgs.fedoraproject.org/cloud-init.git commit 87f33190f43d2b26cced4597e7298835024466c2 Author: Garrett Holmstrom <gholms@fedoraproject.org> Patch7: cloud-init-0.6.2-puppetenable.patch
2011-10-30Write timezone data to /etc/sysconfig/clockScott Moser
If the file /etc/sysconfig/clock exists, assume fedora style timezone config and write 'ZONE="%s' to that file. taken from git://pkgs.fedoraproject.org/cloud-init.git commit 87f33190f43d2b26cced4597e7298835024466c2 Author: Garrett Holmstrom <gholms@fedoraproject.org> Patch5: cloud-init-0.6.2-tzsysconfig.patch
2011-10-30Make locale file location configurableScott Moser
fedora's analog to /etc/default/locale is /etc/sysconfig/i18n . This makes locale_configfile configurable and chooses between /usr/sbin/locale-gen (ubuntu/debian) and /usr/sbin/update-localeo (fedora) based on availability to generate locales. taken from git://pkgs.fedoraproject.org/cloud-init.git commit 87f33190f43d2b26cced4597e7298835024466c2 Author: Garrett Holmstrom <gholms@fedoraproject.org> Patch4: cloud-init-0.6.2-localefile.patch
2011-10-30Restore created files' selinux contextsScott Moser
This adds a restorecon_if_possible method which uses selinux python module, and uses that for files modified in /etc. taken from git://pkgs.fedoraproject.org/cloud-init.git commit 87f33190f43d2b26cced4597e7298835024466c2 Author: Garrett Holmstrom <gholms@fedoraproject.org> Patch3: cloud-init-0.6.2-filecontext.patch
2011-10-27Replace static dict mapping version to packages with a method (LP: #848932)Scott Moser
Previously, there was a 'ruby_packages' dictionary that mapped the ruby version (1.8, 1.9, 1.9.1) to a list of packages that would need to be installed to get a functional gems. This replaces that with a method that is more likely to support future versions without requiring updates to cloud-init. It is not identical output as before. The changes are: * do not include 'ruby' in the case of 1.8, but rather 'ruby1.8' This is because the default could change, and 'ruby' would depend on a different default version. * do not explicitly list 'libruby-<version>' as that is a dependenency of 'ruby<version>' * End result is for any 'version' != 1.8, you'll get the following installed ruby<version> ruby<version>-dev LP: #848932
2011-10-27do not run run-parts if directory has no itemsScott Moser
Per bug 857926, on some systems, run-parts will exit failure if the directory is empty. On debian/ubuntu, at least of recent vintage, it exits success. Its reasonable to just not run it. LP: #857926
2011-10-06DataSourceEc2: catch a socket timeout in wait-for-md-service codeScott Moser
In addition to catching a url timeout, we also need to catch and retry on a socket timeout. Apparently urllib2 doesn't catch this and brand it as a urlerror. LP: #869492
2011-09-23DataSourceOVF: specify timeout=None in read_seeded callScott Moser
If the user told us to read from a seed, we should not timeout quickly