Age | Commit message (Collapse) | Author |
|
The reason for this is that more and more things I was wanting to be able to
see how long they took. This puts that time logic into a single place. It
also supports (by default) reading from /proc/uptime as the timing mechanism.
While that is almost certainly slower than time.time(), it does give
millisecond granularity and is not affected by 'ntpdate' having
run in between the two events.
|
|
|
|
This adds a very well defined and understood mechanism for applying changes to
the cloud-config. Had we seen this previously, we might have not done the
merge-types work.
|
|
Instead of previously initializing and not finalizing the handles that
completed successfully when a handler initializing or running failed we
should attempt to always give said handlers a chance to finalize (even
when another handler fails).
LP: #1203368
|
|
this will automatically decompress individual MIME segments if they
are compressed.
LP: #1203203
|
|
Changing password via 'chpasswd' command in rhel5 would fail, if input
to the 'chpasswd' command doesn't end with '\n'. The fix is just to
append a carriage return to the input.
|
|
Some code from the RHEL handler was moved to a new file so that it can
be used by the SLES handler.
|
|
This datasource is not perfect at this point, but is tested on raring.
It expects that walinuxagent config is set to disable provisioning
(Provisioning.Enabled=n) and also that walinuxagent will not start
otherwise (ie 'echo manual | sudo tee /etc/init/walinuxagent.override).
|
|
Previously we'd not invoked reload-configuration because doing so
caused issues with upstart. Now, instead, determine if we can invoke it.
LP: #1124384
|
|
This is not really a problem, because nothing would call transport_iso9660
with 'require_iso' as False, but if it did, then we would have still
required iso9660 filesystem on the mount.
|
|
LP: #1182265
|
|
|
|
|
|
This branch contains fixes found while investigating integration of cloud-init
into oVirt. They're in 3 categories:
- compatibility with systemd configuration management (as used in Fedora 18)
- workaround for a 2.6 kernel quirk which prevented 'blkid' from displaying
/dev/sr0 in some cases
- writing sysconfig files in typical convention, with a newline preceding EOF,
to make some parsers happy
|
|
dist-upgrade is generally more correct here to get all packages upgraded.
We add the options to change these in system_info. Also, document
the previous apt configuration change (apt_get_command).
LP: #1164147
|
|
This re-works the urlhelper and users of it to use requests rather
than urllib2. The primary benefit is that now when using recent
versions of python-requests (>= 0.8.8) https certificates will be checked.
|
|
This adds a very useful mechanism for merging cloud-config, allowing
the user to append to lists (ie, just add more 'run_cmd') or other
things.
See doc/merging.txt for more information, it is intended to be backwards
compatible by default.
LP: #1023179
|
|
This allows the customization of the apt-get command used for installing
packages, and also adds '--force-unsafe-io'. Because this is spawned from
cloud-init, it seems to make sense as a first boot package installation
option.
|
|
This adds support for resizing partition tables for mounted partitions.
It thus allows us to remove 'cloud-initramfs-growpart' from running in
the initramfs, and do it here instead.
That depends on:
a.) growpart in cloud-utils 0.2.7 or later
or
parted with 'resizepart' support
b.) kernel 3.8.
|
|
|
|
this fixes a confusing message, most commonly found in /var/log/dmesg
or seen on log screens:
init: cloud-init-nonet main process (307) killed by TERM signal
This was actually *expected* as the upstart job was supposed to block
until networking came up, and the SIGTERM was sent by upstart.
That said, the message was confusing. Now, instead we will see something like
cloud-init-nonet[6.54]: waiting 10 seconds for network device
cloud-init-nonet[12.13]: static networking is now up
Which is much nicer. In the event that networking does not come up
you'll see:
cloud-init-nonet[X.Y]: gave up waiting for a network device.
LP: #1015223
|
|
this fixes an issue where ssh keys were not being parsed correctly.
The result was that keys were considered to have options that did not
have options.
Additionally, those options were being written rather than the disable_root
options.
LP: #1136343
|
|
The existing code has two issues with btrfs:
1) The command to resize a btrfs filesystem uses a path to the mount
point, not the underlying device:
$ btrfs filesystem resize max /dev/vda1
ERROR: unable to resize '/dev/vda1' - Inappropriate ioctl for device
Resize '/dev/vda1' of 'max'
$ btrfs filesystem resize max /
Resize '/' of 'max'
2) The code that is given a path and finds the ID of the device where
the path is mounted doesn't work for btrfs:
Use /proc/$$/mountinfo to find the device where path is mounted.
This is done because with a btrfs filesystem using os.stat(path)
does not return the ID of the device.
Here, / has a device of 18 (decimal).
$ stat /
File: '/'
Size: 234 Blocks: 0 IO Block: 4096 directory
Device: 12h/18d Inode: 256 Links: 1
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2013-01-13 07:31:04.358011255 +0000
Modify: 2013-01-13 18:48:25.930011255 +0000
Change: 2013-01-13 18:48:25.930011255 +0000
Birth: -
Find where / is mounted:
$ mount | grep ' / '
/dev/vda1 on / type btrfs (rw,subvol=@,compress=lzo)
And the device ID for /dev/vda1 is not 18:
$ ls -l /dev/vda1
brw-rw---- 1 root disk 253, 1 Jan 13 08:29 /dev/vda1
So use /proc/$$/mountinfo to find the device underlying the input
path.
|
|
* Added arguments to packages/bddeb:
-d pass through '-d' to debuild
--no-cloud-utils don't depend on cloud-utils package (default: False)
These are essential for building on Debian 6, because there are
no python-mocker (build dependency) and cloud-utils (install dependency)
in squeeze and squeeze-backports.
* SysVinit startup scripts modified to run both on RHEL and Debian,
* (Unfortunately) New option INIT_SYSTEM=sysvinit_deb for Debian /etc/init.d/
directory
* Make separate Ubuntu and Debian APT source template (cc_apt_configure)
I'm now generating working Debian 6 package following way:
INIT_SYSTEM=sysvinit_deb packages/bddeb -us -uc --no-cloud-utils -d
|
|
This allows a single file to declare and activate this data source.
This could come from:
* cloud-config-url on kernel cmdline
* /etc/cloud/cloud.cfg.d
* debian preseed of 'cloud-init/local-cloud-config'
Also here is
* some tests
* a small fix to parse_cmdline_data found when writing those tests.
LP: #1115833
|
|
ifquery will exit failure if there is no /run/network directory.
normally that would get created by one of network-interface.conf
or networking.conf. But, it is possible that we're running
before either of those have.
|
|
|
|
The write_files documentation incorrectly used 'perms' rather than
'permissions'.
LP: #1111205
|
|
This change adds the ability to provide specific package versions to
Distro.install_packages and subsequently Distro.package_command. In order
to effectively use Distro.install_packages, one is now able to pass a
variety of formats in order to easily manage package requirements.
These are examples of what can be passed:
- "package"
- ["package1","package2"]
- ("package",)
- ("package", "version")
- [("package1",)("package2",)]
- [("package1", "version1"),("package2","version2")]
This change also adds the option to install a specific version for the
puppet configuration module. This is especially important here as
successful puppet deployments are highly reliant on specific puppet
versions.
|
|
Right now, all distros but ubuntu will fail to manage /etc/hosts.
This is due to the fact that the templates are named:
- hosts.ubuntu.tmpl
- hosts.redhat.tmpl
The config handler is specifically looking for a template with the
given distro name.
This change addresses this issue.
|
|
|
|
previously, there was an attempt in the config drive source to limit
the source device to a "full block device" rather than a partition.
This was done by a simplistic approach of checking that the last
character of the name was not a number. That was filtering out
CD-rom devices (sr0).
Now, we have a bit more sophisticated approach to that same problem.
We filter out block devices that have a 'partition' entry in
/sys/class/block/DEVICE_NAME/partition .
LP: #1100545
|
|
Previously cloud-config to get a '/dev/sr0' entry written to /etc/fstab
would have had to have the full /dev/sr0. This change allows cloud-config
to reference it without the '/dev/' prefix. Like:
| mounts:
| - [ sr0, /media/sr0 ]
|
|
Changes in revision 753 broke cloud-init on ubuntu, as it has a different
dhclient directory than Fedora where the change was developed and tested.
This change does 2 things:
* searches multiple directories (including /var/lib/dhcp) for the lease
files.
* adds a fallback to the old code path of choosing the default route
as the virtual router if there were no virtual routers found in the
lease files.
LP: #1089989
|
|
This simiplifies the logic, by just making it independent of 'system'.
LP: #1096423
|
|
We were trying to avoid the user's password being written to the log, but that
was looking for the wrong option.
LP: #1096417
|
|
|
|
After parsing and merging datasource's config, the changes in were not making
it into the datasource's 'distro.
The end result was that the when a config module was called, it's 'cloud'
argument would be updated in 'cloud.distro', but not in
'cloud.datasource.distro'. This path was required for getting mirror settings
to take affect, because they include information from the datasource.
Ie:
cc_apt_configure had
mirror_info = cloud.datasource.get_package_mirror_info()
the datasource then used *its* copy of sys_cfg to call
self.distro.get_package_mirror_info
and *that* distro's sys_cfg had not been updated.
LP: #1090482
|
|
This adds 'omnibus' to the values supported for chef's "omnibus_url" config
option. It also:
* makes 'omnibus_url' configurable in cloud-config.
* adds a 'force_install' flag, to allow the install code to
act even if /usr/bin/chef-client is already present.
|
|
Instead of always installing puppet give users the ability to opt-out.
LP: #1090205
|
|
Thanks to Anatoliy Dobrosynets
|
|
--stderr would be preferred for readability, but older versions of
logger do not support the long form. Use the short form for compatibility.
LP: #1083715
|
|
|
|
when /etc/ca-certificates.conf is read by update-ca-certificates
lines after a blank line get ignored. Here, ensure that
there are no blank lines, and no duplicate entries for cloud-init are
added.
LP: #1077020
|
|
resize_root: noblock
has been broken in the 0.7.0 series. Using it would disable resizing.
LP: #1080985
|
|
LP: #1080717
|
|
|
|
|
|
this adds 'power-state-change' config module that allows the user to
specify in cloud-config syntax that a system reboot or shutdown should occur
after cloud-init is done.
|
|
It seems like its possible that boto 2.5.2 and below have the lazy loading
metadata dictionary so as a precaution we will always take the hit of
unlazying the metadata dictionary by traversing it which in the non-lazy
dictionary case has no effect (its marginal). This also removes the need
to check the boto version and the dependency on setup tools just for this
case.
|