summaryrefslogtreecommitdiff
path: root/cloudinit
AgeCommit message (Collapse)Author
2016-08-10add ntp config moduleRyan Harper
Add support for installing and configuring ntp service, exposing the minimum config of servers or pools to be added. If none are defined then fallback on generating a list of pools by distro hosted at pool.ntp.org (which matches what's found in the default ntp.conf shipped in the respective distro).
2016-08-10SmartOS: more improvements for network configurationScott Moser
This improves smart os network configuration - fix the SocketClient which was previously completely broken. - adds support for configuring dns servers and dns search (based off the sdc:dns_domain). - support 'sdc:gateways' information from the datasource for configuring default routes. - add converted network information to output when module is run as a main This does not support 'sdc:routes' as described at http://eng.joyent.com/mdata/datadict.html
2016-08-09release 0.7.7Scott Moser
Bump the version in cloudinit/version.py to be 0.7.7.
2016-08-08Newer requests have strong type validationJoshua Harlow
Only use strings in headers, as newer requests actually do stricter validation of this, so ensure that we comply by only having string objects in header dicts.
2016-08-05adjust signal_handler for version changes.Scott Moser
signal_handler was still using vr.version().
2016-08-05drop modification of version during make-tarball, tools changes.Scott Moser
Modification of the tarball became problematic, as it meant that any tool extracting source would find the orig source tarball different. I found this unusable when trying to use 'gbp buildpackage'. Other changes here are to better support using python3 or python2 for the build. Makefile will try to call the right python version and can be told which python to use. read-version: by adding 'tiny_p' and avoiding the import of cloudinit.util, we need less dependencies to run this.
2016-08-05adjust tools and version information.Scott Moser
upstream snapshots are versioned in the format 'X.Y.Z+<distance>.g<commit>' where X.Y.Z are major, minor, and micro. Distance is number of commits since last annotated tag, and commit is the git commit. bddeb and brpm will now create and use the "upstream version" like above. Things changed here: - tools/make-tarball update cloudinit/version.py to contain the full version support --output support '--long' to always create the long format version string. - bddeb: - use quilt debian source format - use read-version and long version in changelog. - brpm: - change to use read-version and upstream long version in the spec. - flake8 changes - tools/read-version - read version from git or from cloudinit/version. - provide --json output with more nicely formed data.
2016-07-19mcollective: add tests, cleanups and bug fix when no config in /etc.Scott Moser
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
2016-07-14merge from trunkScott Moser
2016-07-14ConfigDrive: fix writing of 'injected' files and legacy networkingScott Moser
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 LP: #1602373
2016-07-14Fix mcollective module with python3Scott Moser
fixes mcollective when used with python3 and also adds a unit test. LP: #1597699
2016-07-14fix tox flake8Scott Moser
2016-07-14Change StringIO to BytesIO in cc_mcollective.pySergii Golovatiuk
* 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 LP: #1597699
2016-07-13merge from trunkScott Moser
2016-07-13merge from trunkScott Moser
2016-07-13merge from trunk.lp1602373Scott Moser
this merges in the render_hwaddress support. newly added tests still run, so hwaddress seems correctly getting in.
2016-07-13merge with trunkScott Moser
2016-07-13pass the return back up, shorten lines some.Scott Moser
2016-07-13ConfigDrive: write 'injected' files and legacy networkingScott Moser
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. LP: #1602373
2016-07-13Fix SmartOS datasource usage of dict comprehensionsJoshua Harlow
2016-07-13String format requires positions on python 2.6Joshua Harlow
2016-07-13Another stray occurence of a dict comprehension being removedJoshua Harlow
2016-07-13Remove another stray dict comprehensionJoshua Harlow
2016-07-12Dict comprehensions don't work in 2.6Joshua Harlow
2016-06-28distros/debian.py: fix calling of eni renderer to not render link filesScott Moser
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).
2016-06-27fix restoring from a datasource that did not have dsmodeScott Moser
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. LP: #1596690
2016-06-21user_data: fix error when user-data is not utf-8 decodableScott Moser
when user-data was not decodable, cloud-init would raise exception. LP: #1532072
2016-06-21write_files: if no permissions are given, just use default without warn.Scott Moser
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.
2016-06-21no longer skip 'lo' elements when reading. pass 3rd test.Scott Moser
2016-06-21fix flake8Scott Moser
2016-06-21make 2 of 3 tests passScott Moser
2016-06-21net: fix inet value for subnets, don't add interface attributes to aliasScott Moser
[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. LP: #1588547
2016-06-21fix english in commentScott Moser
2016-06-21merge with trunkScott Moser
2016-06-21fix lost per-interface routes, use post-up to bring up interface aliasesScott Moser
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.
2016-06-21sort attributes in sections, change 'mac_address' to 'hwaddress'Scott Moser
2016-06-21minor cleanupScott Moser
2016-06-21make _render_iface return a list of sections rather than one sectionScott Moser
2016-06-20merge with trunk.Scott Moser
test runs to the point where it did, think I got most of the changes incorporated.
2016-06-20add a header to rendered ENI file describing its contentScott Moser
2016-06-20do not render systemd.link files on debian.Scott Moser
These are unnecessary, as cloud-init is renaming the nics that should be renamed itself.
2016-06-20leave early if no interfaces to renameScott Moser
2016-06-15python3 OSError does not have a .messageScott Moser
2016-06-15merge with trunkScott Moser
2016-06-15DataSourceNoCloud: fix stack trace on reboot, default to dsmode=netScott Moser
On reboot (loading module from obj.pkl) we would hit a AttributeError when trying to access cmdline_id. Addtionally, dsmode was inadvertantly defaulting to local for DataSourceNoCloud. LP: #1592505
2016-06-15remove declaration of dsmode as local in DataSourceNoCloudScott Moser
this would cause the datasource to operate in local mode by default.
2016-06-15fix usage of OSError.message that will not work in python3Scott Moser
python3's OSError does not have a .message attribute.
2016-06-15merge from trunkScott Moser
2016-06-15fix some errors reported by pylintScott Moser
pylint --errors-only found several errors. Some of the changes here represent real errors, others just code that pylint did not like.
2016-06-15merge with trunkScott Moser