summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-03-10util.parse_mount_info(): handle short lines.Blair Zajac
2013-03-10Refactor util.get_mount_info() to facilitate unit testing.Blair Zajac
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().
2013-03-08Enable the merging.txt to be in .rst format for public viewingJoshua Harlow
2013-03-07support different and user-suppliable merging algorithms for cloud-configScott Moser
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
2013-03-07more pep8/pylint. all clean nowScott Moser
2013-03-07fix pep8 and pylintScott Moser
2013-03-07change default merge typeScott Moser
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.
2013-03-07merge from trunkScott Moser
2013-03-07pep8Scott Moser
2013-03-07fix a pylint complaint in test_handler_growpartScott Moser
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.
2013-03-07allow customization of apt-get command, add --force-unsafe-ioScott Moser
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.
2013-03-07pep8 and pylint fixesScott Moser
2013-03-06Add some nice docs on what this is.Joshua Harlow
2013-03-06Make conf.d and the default merging use the new merging algos.Joshua Harlow
2013-03-06Continue working on merging code.Joshua Harlow
2013-03-05Add in a bunch of changes and tests.Joshua Harlow
2013-03-05add 'growpart' config module.Scott Moser
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.
2013-03-05fix ChangeLog entries incorrectly added as 0.6.0Scott Moser
2013-03-05pep8, pylint, make resize_devices return more usefulScott Moser
resize_devices now contains what action occurred for each entry.
2013-03-05add docScott Moser
2013-03-05change default mode to 'auto'Scott Moser
2013-03-05remove 'log' passing. call growpart with --dry-run first.Scott Moser
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.
2013-03-05change default (no 'growpart' in config) to use 'auto' and '/'Scott Moser
2013-03-04test of resize, a couple small fixesScott Moser
2013-03-04add the unit test, fix a few issuesScott Moser
2013-03-04merge from trunkScott Moser
2013-03-04upstart/cloud-init-nonet.conf: handle SIGTERM gracefullyScott Moser
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
2013-03-04add uptime to msg outputScott Moser
2013-03-04if sigterm received, and networking is up, exit 0Scott Moser
LP: #1015223
2013-03-03more workScott Moser
2013-03-03add default log value to get_mount_infoScott Moser
2013-03-01fix an issue where keys were not being parsed correctlyScott Moser
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
2013-03-01fix reversed logicScott Moser
2013-03-01remove debug codeScott Moser
2013-03-01merge from trunkScott Moser
2013-03-01fix regression on expected label of filesystem for DataSourceNoneScott Moser
Last addition to DataSourceNoCloud left it looking for a filesystem named 'None'.
2013-03-01change parser.parse 'default_opts' to 'options'Scott Moser
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.
2013-03-01move function to a static list, comment where it came fromScott Moser
2013-03-01add some unit tests, fix an issue or twoScott Moser
* 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
2013-03-01initial stab at growpart moduleScott Moser
LP: #1136936
2013-03-01skip unit test due to LP: #1124384Scott Moser
2013-03-01Support resizing btrfs filesystems.Blair Zajac
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.
2013-02-27do not reload upstart configuration on upstart jobsScott Moser
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.
2013-02-21Few patches to make life on Debian 6 stable happier:Vlastimil Holer
* 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
2013-02-21Split Debian and Ubuntu APT sourcesVlastimil Holer
2013-02-21New option INIT_SYSTEM=sysvinit_deb for Debian /etc/ directoriesVlastimil Holer
2013-02-21Modify init-scripts to be able to run both on RHEL and Debian.Vlastimil Holer
2013-02-20Added arguments to packages/bddeb:Vlastimil Holer
-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.
2013-02-07DataSourceNoCloud: allow setting user-data and meta-data in configScott Moser
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
2013-02-07more test cases for nocloud including one for config seedScott Moser