Age | Commit message (Collapse) | Author |
|
revision 490 missed some required imports.
|
|
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.
|
|
previously, cloud-init-cfg would call CloudConfig with no cloud
specified. Then, CloudConfig would get a new cloudinit instance
and specify no ds_deps (which means network and local).
If no cache was found, it would wait again for the Ec2 metadata
service (even if it wasn't supposed to).
Now, we get the cloud instance in the main program and attempt to
get the data source, but only from [], which will get only cached.
Then, if its not found, exit silently.
|
|
|
|
Everywhere that there occurred:
except Exception, e:
changed to
except Exception as e:
|
|
|
|
This moves what was done as cloud-run-user-script.conf to 'cloud-final'
and makes that re-use the cloud-init-cfg code, but simply with a different
set of default configs.
Also, adds keys_to_console and final_message cloud-config modules
LP: #653271
|
|
instead of hard-coding in cloud-init-cfg the module list that should be
read, read it from the second command line argument. Basically, instead
of reading 'cloud_config_modules', specify 'cloud_config' when
cloud-init-cfg is run.
change the upstart job to invoke cloud-init-cfg with:
exec cloud-init-cfg all cloud_config
rather than
exec cloud-init-cfg all
|
|
add 'hostname' cloud-config option for setting hostname
make rsyslog and resizefs run at cloud-init time
|
|
- cloud_config and scripts now live in instance directory
- cachedir is now more correctly named 'seeddir'
|
|
Previously, all you would get was a warning to the console on config
module failure. This changes to get a stack trace of the failure to the
console, which is much easier for debugging.
|
|
The previous syntax was either
cloud-init-cfg all
or
cloud-init-cfg <name> args
Ie, you could not specify the frequency if you gave a name. Now, you can.
Something like:
sudo cloud-init-cfg ssh always
|
|
|
|
The list of cloud-config modules is now kept in cloud config itself.
There is a builtin list in cloudinit, which is overrideable by
/etc/cloud/cloud.cfg or user data cloud-config.
This should make the modules more easily added or removed (as no code
needs to be edited now)
Basic summary of changes:
- move CloudConfig.py -> cloudinit/CloudConfig/__init__.py
- split cloud-config modules into their own files named
cloudinit/CloudConfig/cc_<name>.py
- remove all the upstart/cloud-config-* scripts, replacing them with
upstart/cloud-config.conf
|
|
This logging infrastructure in cloudinit:
- uses python logging
- allows user supplied config of logging.config.fileConfig format to be
supplied in /etc/cloud/cloud.cfg or in cloud_config by user data.
- by default, tries to use syslog, if that is not available, writes directly to
/var/log/cloud-init.log (syslog will not be available yet when cloud-init
runs)
- when using syslog, the doc/21-cloudinit.conf file provides a rsyslogd
file to be placed in /etc/rsyslog.d/ that will file [CLOUDINIT] messages
to /var/log/cloud-init.log
|
|
|
|
|
|
|
|
At this point, the following should be functional:
cloud-init-cfg apt-update-upgrade
|