Age | Commit message (Collapse) | Author |
|
|
|
Refactor the parsing portion of util.get_mount_info() into a new
util.parse_mount_info() method. Now util.get_mount_info() opens
/proc/$$/mountinfo, splits on newlines and passes the lines to
util.parse_mount_info().
|
|
|
|
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
|
|
|
|
|
|
the default merge type here was appending to strings and extending lists.
Instead we want the same default that cloud-init had previously, which was to
overwrite lists and strings.
|
|
|
|
|
|
E1103: 81,44:TestWriteFile.test_basic_usage: Instance of 'Bunch' has no
'st_mode' member (but some types could not be inferred)
so, if it wants st_mode, for now just give it one.
|
|
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.
|
|
|
|
resize_devices now contains what action occurred for each entry.
|
|
|
|
|
|
growrun --dry-run will exit 1 if it wouldn't do anything.
so call it, check for '1' and if no change, then just return.
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
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
|
|
|
|
|
|
|
|
Last addition to DataSourceNoCloud left it looking for a filesystem
named 'None'.
|
|
Now, parser.parse specifies options that override any options found,
rather than just being default options.
There could still potentially be a user for default_options, but since we're
not using them anywhere, I've dropped it. The difference is that in setting up
the root user, we're now insisting that all keys that go in there have the
key_prefix, even if the key content had other options.
I think this is actually the commit that fixes LP: #1136343.
|
|
|
|
* drop the parsing of options into csv, as we were only exploding them
back. That can only result in error. Just do minimal parsing.
* change the parsing of key lines to:
if entry is valid:
* use it
else try taking off options:
if good, use it
else fail
|
|
LP: #1136936
|
|
|
|
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.
|
|
For now, we disable reloading upstart jobs due to bug 1124384.
At some point in the future, we could enable it again when that
bug is fixed.
The change here allows for a boothook in a multipart input to write the
file '/run/cloud-init-upstart-reload' and then have configuration
reloaded.
|
|
* 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
|
|
|
|
|
|
|
|
-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.
|
|
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
|
|
|