summaryrefslogtreecommitdiff
path: root/cloudinit
AgeCommit message (Collapse)Author
2013-03-26compatibility fixes for Fedora and RHELGreg Padgett
This patch fixes issues in Fedora 18 (and upcoming RHEL 7) which are present due to their use of systemd: - store locale configuration in /etc/locale.conf - store hostname in /etc/hostname - use a symlink for /etc/localtime (prior code would set the timezone but corrupt data in /usr/share/zoneinfo due to presence of symlink) It also contains fixes for issues unrelated to systemd adoption: - explicitly scan /dev/sr0 with blkid in order to get the optical drive in the blkid cache. This prevents an issue on systems running 2.6 kernels (such as RHEL 6) in which config disks on some devices won't be detected unless the device has previously been queried. (For reference, see https://patchwork.kernel.org/patch/1770241/) - append a newline when rewriting sysconfig files, as this is customary text configuration file formatting and is expected by some parsers (such as the ifcfg-rh plugin for NetworkManager)
2013-03-20pep8Scott Moser
2013-03-20remove some churnScott Moser
cloudinit/sources/DataSourceCloudStack.py and cloudinit/sources/DataSourceEc2.py are reverted entirely back to trunk versions now, rather than the non-behavior change that was left in place. Also, remove inadvertantly added trailing newline from cloudinit/ec2_utils.py Overall, this just makes the diff when merged to trunk carry more focused changes.
2013-03-19Add doc about issue 1401 in boto.Joshua Harlow
2013-03-19Move back to using boto for now.Joshua Harlow
2013-03-19fix typoScott Moser
2013-03-19make get_instance_userdata and get_instance_metadata more like botosScott Moser
this shouldn't change anything, only the signatures of the methods.
2013-03-19set 'allow_redirects' to True by defaultScott Moser
the previous implementation of url_helper.readurl() would default to allow_redirects being true. So, for backwards compat, we should keep that behavior.
2013-03-19do not bother retrying on ssl errorsScott Moser
if the error is an ssl error, its extremely unlikely that it would be fixed by waiting a few seconds and trying again.
2013-03-19appease pylint and pep8Scott Moser
* cloudinit/distros/parsers/resolv_conf.py added some pylint overrides with 'plXXXXX' syntax. example: # pl51222 pylint: disable=E0102 The pl51222 there means: http://www.logilab.org/ticket/51222 This specific issue is present in 12.04 pylint, but not 13.04. * pylint doesn't like the requests special handling we have. which makes sense as it is only checking versus one specific version. * general pep8 and pylint cleanups.
2013-03-19merge from trunk rev 800Scott Moser
2013-03-19pylint fixesScott Moser
a.) appease pylint on raring, as it doesn't like subprocess pylint: 0.26.0-1ubuntu1 This is mentioned in comments at http://www.logilab.org/ticket/46273 b.) tests/unittests/test_util.py: the mountinfo lines are longer than 80 chars. Just disable long lines complaints for this file.
2013-03-19merge from trunk at revno 799Scott Moser
2013-03-13Fix how the http error doesn't always have the response attachedJoshua Harlow
in earlier versions of requests (pre 0.10.8).
2013-03-13Update to handle requests >= 1.0 which doesn't use the config dict.Joshua Harlow
2013-03-13fix / workaround potential for socket.getaddrinfo to raise socket.errorScott Moser
As reported in bug 1154599, I'm seeing this on my desktop system: $ python -c \ 'from cloudinit import util; print util.is_resolvable("brickies.neiit")' Traceback (most recent call last): File "<string>", line 1, in <module> File "cloudinit/util.py", line 865, in is_resolvable socket.SOCK_STREAM, socket.AI_CANONNAME) LP: #1154599
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-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-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-05pep8, pylint, make resize_devices return more usefulScott Moser
resize_devices now contains what action occurred for each entry.
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-03more workScott Moser
2013-03-03add default log value to get_mount_infoScott Moser
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-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-23Fix the maas callback mechanism now that requests is used.harlowja
2013-02-23Get tests working and further adjustments.harlowja
2013-02-21Why did this file showup.harlowja