summaryrefslogtreecommitdiff
path: root/cloudinit/config
AgeCommit message (Collapse)Author
2013-09-27fix syntax error in last commitScott Moser
2013-09-27fix probably debug code that explicitly set 'partition' to 'any'.Scott Moser
2013-09-25add '\n' to no key fingerprint warning Scott Moser
2013-09-25multi_log: only write to /dev/console if it exists.Scott Moser
Some containers lack /dev/console, so when multi_log attempts to open that device and write to it directly things can start going haywire. Here we address this problem by sending console-bound output to stdout and letting init take care of getting it to the console instead. We already configure upstart with "console output", so we need only change systemd to use "journal+console". The one reason that 'console output' might not be sufficient is if the user redirected output with 'output'. Ie: output: init: "> /var/log/my-cloud-init.log" Would then mean all output would go there, and anything that *needed* to go to the console (and was explicitly using multi_log for that purpose) would not get there.
2013-09-25cc_final_message: write to log debug alsoScott Moser
2013-09-19Fixes for the MP.Ben Howard
Changed cc_disk_setup to handle the file systems as a label, no longer passing "log" around. Tidied up the documentation to reflect the changes and made grammer, spelling and improved the content a little. Added disk_setup to the default modules list.
2013-09-11Initial cut at disk partition support.Ben Howard
2013-09-08Add test + remove jsonschema (for now)Joshua Harlow
2013-09-06Ensure validate checks key existence.Joshua Harlow
2013-09-06Add jsonschema for namespaced and verifiable moduleJoshua Harlow
configuration checking as well as make most of the module logic happen in the module itself instead of interacting with the distro object.
2013-09-03Review adjustments.Joshua Harlow
2013-08-14cc_growpart: prefer growpart over parted 'resizepart'Scott Moser
the resizepart code was not functional. We will re-favor it later under bug 1212492. For now, we'll just favor the 'growpart' resizer. Both will be found in Ubuntu cloud images. LP: #1212444
2013-08-14cc_growpart: prefer growpart over parted 'resizepart'Scott Moser
the resizepart code was not functional. We will re-favor it later under bug 1212492. For now, we'll just favor the 'growpart' resizer. Both will be found in Ubuntu cloud images. LP: #1212444
2013-08-06remove unused importScott Moser
2013-08-06remove unused LOG Scott Moser
2013-08-06initially add support for apt_ftp_proxy and apt_https_proxy. tests to come.Scott Moser
LP: #1057195
2013-07-30add util.log_time helperScott Moser
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.
2013-07-23Fix password setting for rhel5.Scott Moser
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.
2013-06-27Remove 'Copyright SUSE' from the headersJuerg Haefliger
Per discussion with Robert @ SUSE since he can't sign the CCA.
2013-06-25Add a SLES distro handlerJuerg Haefliger
2013-06-19fix and cleanup usage of util.logexcJuerg Haefliger
2013-05-20Fix Chef client 'omnibus' install; util.write_file() expects a string not ↵Chris Wing
UrlResponse
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-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-07fix pep8 and pylintScott Moser
2013-03-07merge from trunkScott Moser
2013-03-07pep8 and pylint fixesScott Moser
2013-03-06Continue working on merging code.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-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-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-21Update to code on trunk.harlowja
2013-02-21More work on requests integration.harlowja
2013-02-21Split Debian and Ubuntu APT sourcesVlastimil Holer
2013-02-19Continue working on integrating requests.harlowja
2013-01-30Adding package versioning logic to package installation.Joshua Harlow
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.
2013-01-29Fix broken cc_update_etc_hostsharlowja
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.
2013-01-28Support 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-01-28config/cc_resolv_conf: run PER_INSTANCE rather than PER_ONCEScott Moser
Quick chat with ctracy indicated that this is just as well run PER_INSTANCE, and it is more consistent with other things that way.
2013-01-27Adding package versioning logic to package_commandCraig Tracey
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.