Age | Commit message (Collapse) | Author |
|
|
|
LP: #714807
|
|
This option allows user to specify manual cleaning of the
/var/lib/cloud/instance/ link, for a data source that might not be present on
every boot.
|
|
|
|
The DataSources that are loaded are now controlled entirely via
configuration file of 'datasource_list', like:
datasource_list: [ "NoCloud", "OVF", "Ec2" ]
Each item in that list is a "DataSourceCollection". for each item
in the list, cloudinit will attempt to load:
cloudinit.DataSource<item>
and, failing that,
DataSource<item>
The module is required to have a method named 'get_datasource_list'
in it that takes a single list of "dependencies" and returns
a list of python classes inside the collection that can run needing
only those dependencies.
The dependencies are defines in DataSource.py. Currently:
DEP_FILESYSTEM = "FILESYSTEM"
DEP_NETWORK = "NETWORK"
When 'get_datasource_list' is called for the DataSourceOVF module with
[DEP_FILESYSTEM], then DataSourceOVF returns a single item list with a
reference to the 'DataSourceOVF' class.
When 'get_datasource_list' is called for the DataSourceOVF module with
[DEP_FILESYSTEM, DEP_NETWORK], it will return a single item list
with a reference to 'DataSourceOVFNet'.
cloudinit will then instanciate the class and call its 'get_data' method.
if the get_data method returns 'True', then it selects this class as the
selected Datasource.
|
|
Everywhere that there occurred:
except Exception, e:
changed to
except Exception as e:
|
|
|
|
|
|
|
|
add 'hostname' cloud-config option for setting hostname
make rsyslog and resizefs run at cloud-init time
|
|
This change just uses a different facility for coming up with the path.
But, by design I'm chosing to put 'previous-hostname' in
/var/lib/cloud/data/
rather than in
/var/lib/cloud/instance/data/
The idea is that if the user:
- started an instance
- modified /etc/hostname
- bundled instance (or create-image from it)
- started new instance
They would expect their modified /etc/hostname to persist. As such, the
previous-hostname file should be cross-instance data.
Bugs in this area include LP: #596993 and LP: #514492
|
|
|
|
|
|
LP: #704509
|
|
Now, instead of setting a default value in cloud-init based only on the
DataSource, this supports using 'locale' in the cloud-config.
|
|
The new classes 'DataSourceNoCloud' and 'DataSourceNoCloudNet'
implement a way to get data from the filesystem, or (very minimal)
data from the kernel command line. This allows the user to seed data to
these sources.
There are now 2 "cloud-init" jobs, cloud-init-local that runs on
mounted MOUNTPOINT=/
and 'cloud-init' that runs on
start on (mounted MOUNTPOINT=/ and net-device-up IFACE=eth0 and
stopped cloud-init-local )
The idea is that cloud-init-local can actually function without network.
The last thing in this commit is "uncloud-init".
This tool can be invoked as 'init=/usr/lib/cloud-init/uncloud-init'
It will "uncloudify" things in the image, generally making it easier
to use for a simpler environment, and then it will exec /sbin/init.
|
|
On EBS instances, a shutdown and later start would end up with a
different IP address.
In the case where the user has not modified /etc/hostname from its
original value (seeded by metadata's 'local-hostname'), then cloud-init
will again set the hostname and update /etc/hostname.
In the case where the user *has* modified /etc/hostname, it will remain
user managed.
Additionally, if /etc/cloud/cloud.cfg contains 'preserve_hostname' value
set to a True value, then /etc/hostname will not ever be touched.
LP: #596993
|
|
|
|
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
|
|
|
|
Also
- adds some debugging information when its waiting
- add 'uptime' printout on initial cloud-init invocation
|
|
The cache file location is not instance specific. As such, if it is
not cleaned from the image, a re-bundle would get the old data. To avoid
that, clear the cache in cloud-init.
|
|
|
|
LP: #514492
|
|
|
|
|