summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* README: Mention move of revision control to git.HEADtrunkScott Moser2016-08-10441-53183/+11
| | | | | | | | | | | | | | cloud-init development has moved its revision control to git. It is available at https://code.launchpad.net/cloud-init Clone with git clone https://git.launchpad.net/cloud-init or git clone git+ssh://git.launchpad.net/cloud-init For more information see https://git.launchpad.net/cloud-init/tree/HACKING.rst
* mcollective: add tests, cleanups and bug fix when no config in /etc.Scott Moser2016-07-193-53/+200
| | | | | | | | | | Things here: - restart rather than 'start' the service, to pick up a config change that we would have written. - update the config and write cert files whether or not the file existed on the system. Previously it would only write the cert files if /etc/mcollective/server.cfg already existed. - improve test coverage
* Avoid depending on argparse in 2.7 or greaterJoshua Harlow2016-07-181-0/+3
|\ | | | | | | | | | | | | | | | | | | | | At least (currently) for rhel7 the argparse package does not get installed (even though rpm say it is installed by the python core package) and this causes things that mention argparse in there requirements to not believe that argparse is installed (even though it is) so to avoid this whole mess we can just avoid depending on argparse in python versions where we don't need to (since it was included in the stdlib in python 2.7+)
| * Avoid depending on argparse in 2.7 or greaterJoshua Harlow2016-07-151-0/+3
| | | | | | | | | | | | Its not needed since its a built-in for these versions so we can just skip it for any newer rpm building in the first place.
* | improvements to eni renderingScott Moser2016-07-143-63/+438
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some improvements here, and some bug fixes. - bring curtin revno 394's to support post-up for interface aliases. - sort attributes per interface for nicer order and consistent rendering - use arrays for each 'section' rather than content += . This allows better separation of the sections and also will perform better as long strings with += are slow. - improve how 'lo' is handled. If a network state that was being rendered had an entry for 'lo', then the rendered ENI would have 2 'lo' sections. - no longer skip 'lo' sections when loading an ENI in parse_deb_config - fix inet value for subnets, don't add interface attributes to alias (LP: #1588547) Also add some tests of reading yaml and rendering ENI.
| * \ merge from trunkScott Moser2016-07-144-29/+164
| |\ \ | |/ / |/| |
* | | ConfigDrive: fix writing of 'injected' files and legacy networkingScott Moser2016-07-145-14/+155
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous commit inadvertently disabled the consumption of 'injected' files in configdrive (openstack server boot --file=/target/file=local-file) unless the datasource was in 'pass' mode. The default mode is 'net' so that was not likely to happen. Also here are: a.) some comments to apply_network_config b.) add backwards compatibility for distros that do not yet implement apply_network_config by converting the network config into ENI format and calling apply_network. This is required because prior to the previous commit, those distros would have had 'apply_network' called with the openstack provided ENI file. But after this change they will have apply_network_config called by cloudinit's main. c.) add network_state_to_eni for converting net config to eni it supports the not-actually-correct 'hwaddress' field in ENI
| * | | flake8Scott Moser2016-07-141-1/+0
| | | |
| * | | add test of apply_network fallback path.Scott Moser2016-07-141-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | we could do this more simply by mocking fbsd.apply_network and checking it's inputs. but this pushes it through the whole path that the other test does.
* | | | Fix mcollective module with python3Scott Moser2016-07-143-29/+104
|\ \ \ \ | |_|_|/ |/| | | | | | | fixes mcollective when used with python3 and also adds a unit test.
| * | | give Sergii credit in changelogScott Moser2016-07-141-0/+1
| | | |
| * | | fix tox flake8Scott Moser2016-07-142-15/+15
| | | |
| * | | Change StringIO to BytesIO in cc_mcollective.pySergii Golovatiuk2016-07-142-29/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * StringIO from six doesn't act as 'binary stream' in Python 3. This patch changes StringIO to BytesIO to have code compatible with Python 3 and Python 2. * Add try/except for IOError in case when server.cfg doesn't exists. This is necessary for unit tests or cases when server.cfg is not included to package * Add UnitTest for cc_mcollective.py
| | | * merge from trunkScott Moser2016-07-135-11/+16
| | | |\ | | | |/ | | |/|
| | * | merge from trunkScott Moser2016-07-137-13/+18
| | |\ \ | |_|/ / |/| | |
* | | | Fix SmartOS datasource usage of dict comprehensionsJoshua Harlow2016-07-131-4/+4
| | | |
* | | | String format requires positions on python 2.6Joshua Harlow2016-07-131-2/+2
| | | |
* | | | Another stray occurence of a dict comprehension being removedJoshua Harlow2016-07-131-2/+2
| | | |
* | | | Remove another stray dict comprehensionJoshua Harlow2016-07-131-2/+2
| | | |
* | | | Fixes missing/unpacked rpm filesJoshua Harlow2016-07-131-0/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | There are a few new files that are missing from being included in the rpm specification file (which if missing causes rpmbuild to die) so make sure we add them in.
| * | | | Fixs missing/unpacked rpm filesJoshua Harlow2016-06-301-0/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These new files were not getting picked up during packaging (and they need to, otherwise rpm building fails). - 66-azure-ephemeral.rules - cloud-init-generator
* | | | Dict comprehensions don't work in 2.6Joshua Harlow2016-07-131-1/+2
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | This fixes a small case of a leftover dict comprehension being found that stops cloud-init from working on centos6/rhel6 (which still use py2.6)
| * | | Dict comprehensions don't work in 2.6Joshua Harlow2016-07-121-1/+2
|/ / /
| | * merge from trunk.lp1602373Scott Moser2016-07-134-18/+106
| | |\ | | |/ | |/| | | | | | | this merges in the render_hwaddress support. newly added tests still run, so hwaddress seems correctly getting in.
| * | pass the return back up, shorten lines some.Scott Moser2016-07-131-4/+5
| | |
| * | ConfigDrive: write 'injected' files and legacy networkingScott Moser2016-07-135-15/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous commit disabled the consumption of 'injected' files in configdrive (openstack server boot --file=/target/file=local-file) unless the datasource was in 'pass' mode. The default mode is 'net' so that would never happen. Also here are: a.) a fix for 'links_path_prefix' string from debian, to finally disable the rendering of systemd.link files (LP: #1594546) b.) some comments to apply_network_config c.) implement a backwards compatibility for for distros that do not yet implement apply_network_config by converting the network config into ENI format and calling apply_network. This is required because prior to the previous commit, those distros would have had 'apply_network' called with the openstack provided ENI file. But after this change they will have apply_network_config called by cloudinit's main. d.) a network_state_to_eni helper for converting net config to eni it supports the not-actually-correct 'hwaddress' field in ENI.
| | * merge with trunkScott Moser2016-07-136-15/+40
| | |\ | |_|/ |/| |
* | | distros/debian.py: fix calling of eni renderer to not render link filesScott Moser2016-06-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Under revno 1243 a failed attempt was made to not render systemd.link files into /etc/systemd/network/ . The 'config' that was passed in was incorrect though, and resulted in link files still getting rendered. (original bug was LP: #1594546).
* | | fix restoring from a datasource that did not have dsmodeScott Moser2016-06-271-1/+2
|/ / | | | | | | | | On upgrade and reboot, if datasource restored from obj.pkl did not have a dsmode attribute, then 'init --local' would fail due to stack trace.
* | user_data: fix error when user-data is not utf-8 decodableScott Moser2016-06-223-12/+34
|\ \ | | | | | | | | | | | | | | | | | | | | | when user-data was not decodable, cloud-init would raise exception. This also changes the signature of user_data.convert_string. The 'headers' argument was never used, and woudl have been broken if it was, as it was expected to be a dictionary but then was passed in with *headers.
| * | rename test class, add a test, improve test namesScott Moser2016-06-221-2/+7
| | |
| * | user_data: fix error when user-data is not utf-8 decodableScott Moser2016-06-213-12/+29
|/ / | | | | | | when user-data was not decodable, cloud-init would raise exception.
* | write_files: if no permissions are given, just use default without warn.Scott Moser2016-06-212-0/+3
| | | | | | | | | | | | | | if no permissions were given in a write_files stanza, then a warning would be emitted. The fix here is just to special case handling of None.
| * no longer skip 'lo' elements when reading. pass 3rd test.Scott Moser2016-06-212-6/+2
| |
| * fix flake8Scott Moser2016-06-212-8/+2
| |
| * make 2 of 3 tests passScott Moser2016-06-212-153/+275
| |
| * net: fix inet value for subnets, don't add interface attributes to aliasScott Moser2016-06-211-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [copied from curtin revno 390] Apply two separate fixes for configuring bonding with ip aliases. Curtin re-used the interface's inet value for each subnet that might be configured. In the case where the configuration included an ipv4 address after an ipv6 one resulted in emitting 'inet6' for ipv4 address which is not correct. Resolve this issue by calculating the inet value independent of the current status of the iface, using the subnet config instead. When rendering a network_config which includes ip alias interfaces do not emit any attributes, like MTU, or bond/bridge options Including these values is almost always wrong or will result in confusing behavior on the target system.
| * fix english in commentScott Moser2016-06-211-1/+1
| |
| * merge with trunkScott Moser2016-06-213-2/+17
| |\ | |/ |/|
* | do not render systemd.link filesScott Moser2016-06-203-2/+17
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When fixing bug 1579130, we made cloud-init rename devices itself, rather than relying on the systemd.link files to do that. That was necessary to - rename devices in a container - rename devices on first boot or in any situation when the link files in the initramfs were stale. However, cloud-init was still writing .link files like: /etc/systemd/network/50-cloud-init-ens2.link That leads to just a confusing situation as cloud-init will trump any renaming systemd does in all cases. Also added here is a header into the rendered ENI file: /etc/network/interfaces.d/50-cloud-init.cfg that describes how to disable cloud-init networking.
| * | add a header to rendered ENI file describing its contentScott Moser2016-06-202-1/+11
| | |
| * | do not render systemd.link files on debian.Scott Moser2016-06-201-1/+1
| | | | | | | | | | | | | | | These are unnecessary, as cloud-init is renaming the nics that should be renamed itself.
| * | leave early if no interfaces to renameScott Moser2016-06-201-0/+5
|/ /
| * fix lost per-interface routes, use post-up to bring up interface aliasesScott Moser2016-06-212-3/+18
| | | | | | | | | | | | | | Fix the lack of per-interface routes, and add an example to yaml. in revno 394 in curtin, we added post-up for interface aliases. bring that commit here.
| * commit test changesScott Moser2016-06-211-13/+8
| | | | | | | | | | cleaned up tests a bit. still they raise exception, but print out the files rendered and all use the _render_and_read helper.
| * sort attributes in sections, change 'mac_address' to 'hwaddress'Scott Moser2016-06-211-6/+8
| |
| * minor cleanupScott Moser2016-06-211-6/+5
| |
| * make _render_iface return a list of sections rather than one sectionScott Moser2016-06-211-8/+11
| |
| * merge with trunk.Scott Moser2016-06-2055-1406/+3177
| |\ | |/ |/| | | | | test runs to the point where it did, think I got most of the changes incorporated.
* | support network rendering to sysconfig (for centos and RHEL)Scott Moser2016-06-1510-103/+724
|\ \ | | | | | | | | | | | | | | | This intends to add support for rendering of network data under sysconfig distributions (centos and rhel). The end result will be support for network configuration via ConfigDrive or NoCloud on these OS.