summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2013-02-07add test_nocloud unit tests, fix one issue foundScott Moser
2013-02-07user-data doesn't merge in from meta-data (typo)Scott Moser
2013-02-06Add initial docs about datasources.harlowja
Start moving the current README for datasources to a RST format and include those files in the rtd site.
2013-02-05Continue adding datasource docs.harlowja
Add a base set for ec2 and datasource none.
2013-02-04Add initial docs about datasources.harlowja
Start moving the current README for datasources to a RST format and include those files in the rtd site. LP: #1113650
2013-02-04make config of nocloud datasource able to specify meta-data and user-dataScott Moser
LP: #1115833
2013-01-31upstart/cloud-init-container.conf: ensure /run/network existsScott Moser
ifquery will exit failure if there is no /run/network directory. normally that would get created by one of network-interface.conf or networking.conf. But, it is possible that we're running before either of those have.
2013-01-31Changelog: reformat to limit to 80 chars wideScott Moser
2013-01-31doc: fix example in cloud-config-write-files.txtScott Moser
The write_files documentation incorrectly used 'perms' rather than 'permissions'. LP: #1111205
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-30Support package versions for the generic package config modulectracey
Augmenting the package version support to be available when specifying extra packages to be installed at boot via the 'packages:' yaml key. This change also improves type checking and add a configuration example to the docs.
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-28Include the resolv.conf example.Joshua Harlow
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-28add entries to ChangeLogScott Moser
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.
2013-01-25Don't forget the hacking 'inclusion' file.Joshua Harlow
2013-01-25Integreate HACKING into the rtd site.Joshua Harlow
2013-01-25Adding a resolv.conf configuration module (LP: #1100434)Joshua Harlow
Managing resolv.conf can be quite handy when running in an environment where you would like to control DNS resolution, despite being provided DNS server information by DHCP. This module will allow one to define the structure of their resolv.conf and write it PER_ONCE. Right now this makes the most sense on RedHat, and therefore, has defined 'distros' as such. Note that when a config drive is used, and dhcp is not used that this module may not be applicable since in the RedHat based distros the config drive typically contains a ubuntu style network configuration which contains nameservers that can be used in /etc/resolv.conf, but for other types of datasources it is useful to have a module which can be specifically configured to write out /etc/resolv.conf
2013-01-25Add a HACKING file (in rst format).Joshua Harlow
Adding a HACKING file based upon a message from smoser on the mailing list from 12/12/2012.
2013-01-25Adding a doc example for resolv_conf handler.ctracey
As per harlowja's suggestion addding an example to the doc directory for cc_resolv_conf.py
2013-01-25Moving HACKING to restructured textctracey
As per harlowja's suggestion, moving this HACKING file to restructured text format.
2013-01-24Remove the release for now.harlowja
2013-01-24Fix the release variable.harlowja
2013-01-24Make the logo better.harlowja
2013-01-24Merge the old user style with the distro provided config.harlowja
When the old user: style entry is found, don't forget that we need to use the distro settings that are provided but override the name with the new name, this is now accomplished by merging them together in the correct order (using the standard cloud-init merging algo).
2013-01-24Add docs which can be used on readthedocs.orgJoshua Harlow
Include a new set of docs that can be used to create a readthedocs.org site, which includes examples, directory layout, capabilities and such. This in-code documentation then allows for readthedocs.org to create a website directly from the cloud-init codebase.
2013-01-24Add in a tool to help make mime multipart messages.Joshua Harlow
2013-01-21Add in a tool to help make mime multipart messages.Joshua Harlow
2013-01-21Add support for operating system familiesJoshua Harlow
Often it is convenient to classify a distro as being part of an operating system family. for instance, file templates may be identical for both debian and ubuntu, but to support this under the current templating code, one would need multiple templates for the same code. Similarly, configuration handlers often fall into the same bucket: the configuraton is known to work/has been tested on a particular family of operating systems. right now this is handled with a declaration like: distros = ['fedora', 'rhel'] This fix seeks to address both of these issues. it allows for the simplification of the above line to: osfamilies = ['redhat'] It also provides a mechanism for operating system family templates.
2013-01-19Merge the old user style with the distro provided config.harlowja
When the old user: style entry is found, don't forget that we need to use the distro settings that are provided but override the name with the new name, this is now accomplished by merging them together in the correct order (using the standard cloud-init merging algo).
2013-01-18Adjust how the legacy user: XYZ config alters the normalized user listJoshua Harlow
Previously if a legacy user: XYZ entry was found, XYZ would not automatically be promoted to the default user but would instead just be added on as a new entry to the normalized user list. It appears the behavior that is wanted is for the XYZ entry to be added on as the default user (thus overriding a distro provided default user), which better matches how the code previous worked. LP: #1100920
2013-01-17Fixing missing argument to get_cfg_option_boolCraig Tracey
Forgot to pass cfg to this function, and thus this would have never worked.
2013-01-17Adding a resolv.conf configuration module (LP: #1100434)Craig Tracey
Managing resolv.conf can be quite handy when running in an environment where you would like to control DNS resolution, despite being provided DNS server information by DHCP. This module will allow one to define the structure of their resolv.conf and write it PER_ONCE. Right now this makes the most sense on RedHat, and therefore, has defined 'distros' as such.
2013-01-16DataSourceConfigDrive: consider CD rom as valid config-drive source.Scott Moser
previously, there was an attempt in the config drive source to limit the source device to a "full block device" rather than a partition. This was done by a simplistic approach of checking that the last character of the name was not a number. That was filtering out CD-rom devices (sr0). Now, we have a bit more sophisticated approach to that same problem. We filter out block devices that have a 'partition' entry in /sys/class/block/DEVICE_NAME/partition . LP: #1100545
2013-01-15Fix broken cc_update_etc_hosts (LP: #1100036)ctracey
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 and is contingent upon support of 'osfamilies' as implemented in LP: #1100029 (lp:~craigtracey/cloud-init/osfamilies)
2013-01-15cleanup a pep8 failurectracey
accidentally removed a line between two functions.
2013-01-15add support for operating system familiesctracey
often it is convenient to classify a distro as being part of an operating system family. for instance, file templates may be identical for both debian and ubuntu, but to support this under the current templating code, one would need multiple templates for the same code. similarly, configuration handlers often fall into the same bucket: the configuraton is known to work/has been tested on a particular family of operating systems. right now this is handled with a declaration like: distros = ['fedora', 'rhel'] this fix seeks to address both of these issues. it allows for the simplification of the above line to: osfamilies = ['redhat'] and provides a mechanism for operating system family templates.
2013-01-15Add a HACKING filectracey
Adding a HACKING file based upon a message from smoser on the mailing list from 12/12/2012.