summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-04-17Altering the order of merging.Joshua Harlow
2013-04-17add debug output to ccfg-merge-debugScott Moser
Exeptions were being swallowed completely and no way to even see them other than log.
2013-04-17Handle namespacing issues.Joshua Harlow
Move from using the inbuilt type names as module names which is a bad thing to use it appears due to naming conflicts in the __init__ module and reduce the chances of these conflicts by enforcing a m_ prefix for merging modules.
2013-04-10improvments to systemd/fedora 18 supportGreg Padgett
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
2013-04-09tools: fix [some] shell quoting problemsScott Moser
There were problems with these tools if the path had a space. This should make these tools safe. There are others that still have problems.
2013-04-09tools: fix [some] shell quoting problemsScott Moser
There were problems with these tools if the path had a space. This should make these tools safe. There are others that still have problems.
2013-04-03add merge debug toolScott Moser
2013-04-03invoke dist-upgrade instead of upgrade for apt upgradesScott Moser
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
2013-04-03invoke 'dist-upgrade' instead of 'upgrade' on for upgrades.Scott Moser
In general, dist-upgrade is the correct behavior here. It will get a new kernel, though, which could be annoying. So, allow a way to turn it off (by setting 'apt_get_upgrade_subcommand: upgrade'). LP: #1164147
2013-04-02Fix the default string used for merging.Joshua Harlow
It had been changed in code, but not in docs. So we needed to reflect the change in docs as well so that both are in sync.
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-26handle errors in cc_reizefs betterScott Moser
Now, errors will not be so annoying if the device doesn't exist. Specifically, if there is no device in a container, only debug messages will be logged. LP: #1160462
2013-03-26cloud-init-nonet.conf: handle case where sleep diedScott Moser
In starting containers in lxc, I was seeing errors like: /proc/self/fd/9: 24: kill: No such process Which indicated the sleep pid had already died. I'm not sure how or why it was dead, but this just is less annoying in that case.
2013-03-26fix brpm and bddeb by knowing about 'python-requests'Scott Moser
2013-03-20use 'requests' rather than urllib2.Scott Moser
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.
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-12refactor get_mount_info and add testsBlair Zajac
1) Refactor util.get_mount_info() to facilitate unit testing. 2) Add unit tests for /proc/$$/mountinfo parsing.
2013-03-12skip unit test due to LP: #1124384Scott Moser
This re-applies the change in revno 785. A merge made this test pass rather than skip, but I'd rather have it skip for now, as we really hope to have the upstart bug fixed.
2013-03-10util.parse_mount_info(): add unit tests.Blair Zajac
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.