Age | Commit message (Collapse) | Author |
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
If the user told us to read from a seed, we should not timeout quickly
|
|
LP: #855965
|
|
|
|
read_seeded also takes a 'file_retry' which defaults to zero.
This is so that if the seed path is a file, retries are not done.
read_optional_seed is not passing 'retries=0' here, but
all the users of read_optional_seed are using it from file.
|
|
|
|
This fixes (LP: #850206). See bug for more info.
LP: #850206
|
|
lp:~avishai-ish-shalom/cloud-init/chef
Bringing in 'initial_properties' support from lp:~avishai-ish-shalom/cloud-init/chef
|
|
Support both 'validation_cert' and 'validation_key' for backwards compatibility
Cleaned up line length
|
|
Added support for 'node_name' and 'environment' properties.
Renamed 'validation_cert' to 'validation_key' to match Chef's nomenclature.
|
|
|
|
LP: #845155
|
|
|
|
|
|
LP: #845161
|
|
validation cert name
|
|
|
|
This is the same change made in DataSourceNoCloud, but to the
OVF DataSource.
|
|
LP: #832175
|
|
This allows for the chance that platform.node returned
a fully qualified domainname. Per its doc:
Returns the computer's network name (which may not be fully
qualified)
|
|
If there is no local-hostname, then the base DataSource will
make attempts to resolve it. Having a default here meant that
it would be taken as truth.
|
|
Previously the Ubuntu specific and confusing string "ubuntuhost" was
used. Use something that gives a better hint as to where it came from
for get_instance_id()
|
|
These changes update the .ssh/authorized_keys rather than simply appending
This is preferable as ssh daemon picks the first key that is present.
This fixes 2 issues where something had edited a .ssh/authorized_keys
prior to cloud-init getting at it.
a.) LP: #434076 a user prior to re-bundling
b.) LP: #833499 the hypervisor
If you want to enable ssh access for root user, the proper way to do it is
with 'disable_root: False' in cloud-config.
LP: #434076, #833499
|
|
When 'cloud-init start' (network) runs, it will print information
about the systems network info to the console. This will help in debugging
instances.
LP: #828186
|
|
Fix issue where 'isatty' would return true for apt-add-repository.
It would get stdin which was attached to a terminal (/dev/console) and would
thus hang when running during boot.
This was done by changing all users of util.subp to have None input unless
input was given. In that case, the input will be the string passed in.
LP: #831505
|
|
|
|
add-apt-repository (LP #831505)
|
|
|
|
For better or worse, 'manage_etc_hosts' means
"write /etc/hosts from the template"
The default setting is 'False', which was not to update
/etc/hosts at all. Now, we're updating /etc/hosts, claiming
the 127.0.1.1 entry as owned by cloud-init if manage_etc_hosts is
false.
|
|
|
|
|
|
This adds a method 'get_hostname_fqdn' to cloudinit.util, and then
uses this method for getting the hostname and fqdn in places that get
hostname.
The single place for getting it right will help.
|
|
This fixes a couple issues with the updating of /etc/hosts
by the update-etc-hosts cloud-config module.
* if hostname changed in the life of the instance, an additional
"header" line would be added.
* any comment lines like '#mycomment' would be deleted because
they did not have 2 fields
|
|
consume_userdata should really run always, rather than once per instance.
The documentation says that boothooks were on their own for per-instance
but since this routine was only being called once, they would only get
called once.
This modifies the behavior to be:
user_script: per_always
cloud_config : per_always
upstart_job : per_instance
cloud_boothook: per_always
In order to not break part handlers that are existing, and expect to only be
called once per instance, this adds a 'handler_version' item in a handler
that can indicate the version (currently 1 or 2). If it is 2, then the
hander will be passed the frequency (per-instance or per-always) that this
is being run. That way the handler can differenciate between them.
This also makes 'bootcmd' run every boot. That should be changable in
cloud-config though, so users who dont like the behavior can modify it.
LP: #819507
|
|
base64 encode will grow with the size of the url, possibly resulting
in silly-long filenames. md5sum will keep it to a constant length.
|
|
at this point, the following user-data file in
/var/lib/cloud/seed/nocloud-net/user-data will do what you would expect:
$ cat > /var/lib/cloud/seed/nocloud-net/user-data <<EOF
#include-once
http://169.254.169.254/2011-01-01/user-data
EOF
$ python -c \
'import boto.utils, pprint; pprint.pprint(boto.utils.get_instance_metadata())' |
sudo tee /var/lib/cloud/seed/nocloud-net/meta-data
Then,
$ sudo sh -c 'for i in /var/lib/cloud/*; do [ ${i##*/} = "seed" ] &&
continue; rm -Rf "$i"; done'
$ sudo reboot
You will then find a file in /var/lib/cloud/instance/data/urlcache/
that has the contents of user-data from the metadata service.
It will not be downloaded again as long as that file is present.
|
|
|
|
Marc's implementation would only ever process the include-once urls a single
time. This changes that to process them every time, with the second time
coming from a file on disk rather than the url.
You can then do expiring or one time use URLs in the include-once and
have all function of if the content was there every time.
The cached file is readable by root-only.
|
|
|
|
|
|
|
|
|
|
t1.micro do not have a ephemeral0 disk, but the metadata service will have
an entry there.
i386 t1.micro:
'block-device-mapping': {'ami': '/dev/sda1',
'ephemeral0': '/dev/sda2',
'root': '/dev/sda1'},
amd64 t1.micro:
'block-device-mapping': {'ami': '/dev/sda1',
'ephemeral0': '/dev/sdb',
'root': '/dev/sda1'},
LP: #744019
|
|
In the case where a seedfrom value was given on the command line or in the
config file, we were timing out in 2 seconds on the connection. That timeout
was put in place to support "probing" for sources, but seedfrom is explictly
given.
So, in that case, do a urllib.open without a timeout value. Looking at source
code, default timeout is 'socket._GLOBAL_DEFAULT_TIMEOUT', but rather than
importing that and using it, I will call without a timeout value.
LP: #812646
|