summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-10-17fix some more typos in commentsDominic Schlegel
2019-10-17replace any deprecated log.warn with log.warningDominic Schlegel
Commit 6797e822959b84c98cf73e02b2a6e3d6ab3fd4fe replaced the LOG.warn calls that linters were warning about; this also replaces calls that linters would not have recognised (as `log` is generally a parameter in these scenarios). LP: #1508442
2019-10-16net: handle openstack dhcpv6-stateless configurationHarald Jensås
Openstack subnets can be configured to use SLAAC by setting ipv6_address_mode=dhcpv6-stateless. When this is the case the sysconfig interface configuration should use IPV6_AUTOCONF=yes and not set DHCPV6C=yes. This change sets the subnets type property to the full network['type'] from openstack metadata. cloudinit/net/sysconfig.py and cloudinit/net/eni.py are updated to support new subnet types: - 'ipv6_dhcpv6-stateless' => IPV6_AUTOCONF=yes - 'ipv6_dhcpv6-stateful' => DHCPV6C=yes Type 'dhcp6' in sysconfig is kept for backward compatibility with any implementations that set subnet_type == 'dhcp6'. LP: #1847517
2019-10-16Add .venv/ to .gitignoreDominic Schlegel
2019-10-16Small typo fixes in code comments.Dominic Schlegel
2019-10-11cloud_test/lxd: Retry container delete a few timesRyan Harper
LXD integration tests fail sometimes due to failure to delete the container, usually related to ZFS backend. This is a transient issue unrelated to the test itself. Teach LXD platform to retry this a few times before returning an error.
2019-10-11Add Support for e24cloud to Ec2 datasource.Scott Moser
e24cloud provides an EC2 compatible datasource. This just identifies their platform based on dmi 'system-vendor' having 'e24cloud'. https://www.e24cloud.com/en/ . Updated chassis typo in zstack unit test docstring. LP: #1696476
2019-10-04Add RbxCloud datasourceAdam Dobrawy
2019-10-04get_interfaces: don't exclude bridge and bond membersDaniel Watkins
The change that introduced this issue was handling interfaces that are bonded in the kernel, in a way that doesn't present as "a bond" to userspace in the normal way. Both members of this "bond" will share a MAC address, so we filter one of them out to avoid incorrect MAC address collision warnings. Unfortunately, the matching condition was too broad, so that change also affected normal bonds and bridges. This change specifically excludes bonds and bridges from that determination, to address that regression. LP: #1846535
2019-10-01Add support for Arch Linux in render-cloudcfgConrad Hoffmann
 - Detect Arch Linux and set variant accordingly in `system_info()`  - Allow setting render-cloudcfg variant parameter to 'arch'  - Adjust some basic settings for Arch Linux in the cloud.cfg.tmpl The template might need some additional Arch-specific tweaks in the future, but at least for now the generated config works and contains the most relevant modules. Also: - Sort distro variant lists when adding Arch - Add debian to known variants in render-cloudcfg
2019-09-27util: json.dumps on python 2.7 will handle UnicodeDecodeError on binaryChad Smith
Since python 2.7 doesn't handle UnicodeDecodeErrors with the default handler LP: #1801364
2019-09-27debian/ubuntu: add missing word to netplan/ENI headerDaniel Watkins
Specifically, add in "reboot" to make it clear what people should expect when modifying the file. This also renames the variable to indicate it is used for netplan and ENI, not just ENI. LP: #1845669
2019-09-27ovf: do not generate random instance-id for IMC customization pathRyan Harper
Cloud-init will not operate properly if the instance-id value changes on each boot. This is the source of a number of behavioral bugs filed against cloud-init with OVF datasource. Instead, use a static instance-id value, iid-vmware-imc, similar to iid-dsovf.
2019-09-26sysconfig: only write resolv.conf if network_state has DNS valuesRyan Harper
If an OS image provided an /etc/resolv.conf file that was not empty cloud-init would read and re-write it with a cloud-init header even if no DNS network configuration was provided (e.g. DHCP only). This can cause problems for some network services which don't ignore cloud-init's header. LP: #1843634
2019-09-26sysconfig: use distro variant to check if availableRyan Harper
The sysconfig renderer used the distro name directly which mean some variants of distros were not considered supported. Fix this by using util.system_info()['variant'] instead. Fix the list of KNOWN_DISTROS value for redhat -> rhel. LP: #1843584
2019-09-26systemd/cloud-init.service.tmpl: start after wicked.serviceRobert Schweikert
Change the startup order. On SUSE distros cloud-init.service should start after wicked.service. This reflects the same start up order other distributions utilize.
2019-09-26docs: fix zstack documentation lintsChad Smith
Resolve the following lints raised by 'make doc': - doc/rtd/topics/datasources/zstack.rst:5: D001 Line too long - doc/rtd/topics/datasources/zstack.rst:10: D001 Line too long
2019-09-25analyze/show: remove trailing space in outputDaniel Watkins
2019-09-25Add missing space in warning: "not avalid seed"Brian Candler
2019-09-25pylintrc: add 'enter_context' to generated-members listRyan Harper
On Bionic (python 3.6.8) we now see no-member errors on untouched code. This does not reproduce on Xenial (3.5) nor on Eoan (3.7.4). The source of the failure was the release of astroid 2.3.0 vs. 2.2.5. Resolve this by adding the member attribute to the generated member list in pylintrc. This fixes CI failures.
2019-09-18Add datasource for ZStack platform.Shixin Ruan
Zstack platform provides a AWS Ec2 metadata service, and identifies their platform to the guest by setting the 'chassis asset tag' to a string that ends with '.zstack.io'. LP: #1841181
2019-09-18docs: organize TOC and update summary of projectJoshua Powers
2019-09-18tools: make clean now cleans the dev directory, not the systemChad Smith
Remove pyc files, .tox directories and docs during make clean.
2019-09-18docs: create cli specific pageJoshua Powers
This is formerly the capabilities page.
2019-09-18docs: added output examples to analyze.rstJoshua Powers
2019-09-18docs: doc8 fixes for instancedata pageJoshua Powers
The huge table was scrolling off the page for me and it made more sense to break this up and have sections for each item anyway.
2019-09-18docs: clean up formatting, organize boot pageJoshua Powers
2019-09-17net: add is_master check for filtering device listRyan Harper
Some network devices are transformed into a bond via kernel magic and do not have the 'bonding' sysfs attribute, but like a bond they have a duplicate MAC of other bond members. On Azure Advanced Networking SRIOV devices are auto bonded and will have the same MAC as the HyperV nic. We can detect this via the 'master' sysfs attribute in the device sysfs path and this patch adds this to the list of devices we ignore when enumerating device lists. LP: #1844191
2019-09-14docs: more complete list of availabilityJoshua Powers
2019-09-14docs: start FAQ pageJoshua Powers
Takeover the moreinfo.rst page and update initially with pages a user can use to learn about cloud-init. For now, other docs and presentations about cloud-init. Goal is to use this page to collect very commonly asked questions.
2019-09-14docs: cleanup output & order of datasource pageJoshua Powers
2019-09-11Brightbox: restrict detection to require full domain match .brightbox.comScott Moser
The detection for brightbox in both ds-identify and in identify_brightbox would incorrectly match the domain 'bobrightbox', which is not a brightbox platform. The fix here is to restrict matching to '*.brightbox.com' rather than '*brightbox.com' Also, while here remove a url to bug 1661693 which added the knowledge of brightbox.
2019-09-11VMWware: add option into VMTools config to enable/disable custom script.Xiaofeng Wang
VMWware customization already has support to run a custom script during the VM customization. Adding this option allows a VM administrator to disable the execution of customization scripts. If set the script will not execute and the customization status is set to GUESTCUST_ERROR_SCRIPT_DISABLED.
2019-09-09net,Oracle: Add support for netfailover detectionRyan Harper
Add support for detecting netfailover[1] device 3-tuple in networking layer. In the Oracle datasource ensure that if a provided network config, either fallback or provided config includes a netfailover master to remove any MAC address value as this can break under 3-netdev as the other two devices have the same MAC. 1. https://www.kernel.org/doc/html/latest/networking/net_failover.html
2019-09-09atomic_helper: add DEBUG logging to write_fileDaniel Watkins
LP: #1843276
2019-09-07doc: document doc, create makefile and tox targetJoshua Powers
* Create makefile and tox targets for documentation building and testing to better replicate the live web docs using the same theme. * Created docs.rst to explain how to build and contribute to documentation with style guide and tips. * doc/rtd/conf.py:     * Add copyright to rtd config     * Use Sphinx's RTD theme to replicate actual docs
2019-09-06.gitignore: ignore files produced by package buildsDaniel Watkins
2019-09-04docs: fix whitespace, spelling, and line lengthJoshua Powers
2019-09-03docs: remove unnecessary file in doc directoryJoshua Powers
2019-08-28Oracle: Render secondary vnic IP and MTU values onlyRyan Harper
When rendering secondary vnic configuration from IMDS, only emit configuration for the IP and MTU values only. Add support to mutate either a v1 or a v2 network_config input.
2019-08-28exoscale: fix sysconfig cloud_config_modules overridesChad Smith
Make sure Exoscale supplements or overrides existing system config setting cloud_config_modules instead of replacing it with a one item list set-passords LP: #1841454
2019-08-22net/cmdline: refactor to allow multiple initramfs network config sourcesDaniel Watkins
This refactors read_initramfs_config to support multiple different types of initramfs network configuration. It introduces an InitramfsNetworkConfigSource abstract base class. There is currently a single sub-class, KlibcNetworkConfigSource, which contains the logic which previously was directly within read_initramfs_config.
2019-08-22ubuntu-drivers: call db_x_loadtemplatefile to accept NVIDIA EULAChad Smith
Emit a script allowing cloud-init to set linux/nvidia/latelink debconf selection to true. This avoids having to call debconf-set-selections and allows cloud-init to pre-confgure linux-restricted-modules to link NVIDIA drivers to the running kernel. Cloud-init loads this debconf template and sets the value to true in the debconf database by sourcing debconf's /usr/share/debconf/confmodule and uses db_x_loadtemplatefile to register cloud-init's setting for linux/nvidia/latelink. LP: #1840080
2019-08-20Add missing #cloud-config comment on first example in documentation.Florian Müller
Since this is the first code snippet some users might see, they could end up in the same situation like me today when they wonder why their yaml user config is not working at all.
2019-08-19ubuntu-drivers: emit latelink=true debconf to accept nvidia eulaChad Smith
To accept NVIDIA EULA, cloud-init needs to emit latelink=true debconf setting to the linux-restricted-modules package to allow NVIDIA drivers to properly link to the running kernel. LP: #1840080
2019-08-19DataSourceOracle: prefer DS network config over initramfsDaniel Watkins
The Oracle platform provides networking configuration from two sources: * the primary interface configuration comes from the initramfs, because Oracle instance all iSCSI boot * secondary interface configuration comes from an IMDS accessed over HTTP As we need to combine these two sources of network configuration, the default "prefer initramfs config over data source config" behaviour isn't appropriate; we would never get the IMDS interfaces via that route. Instead, the Oracle data source has code to combine these two sources, so we prefer its network configuration over the initramfs configuration. (This is not appropriate default behaviour, because _in general_ data sources won't know how to merge initramfs-provided configuration into their provided configuration, so switching this order for all data sources would result in initramfs configuration being discarded on any data source that implements network_config.)
2019-08-19format.rst: add text/jinja2 to list of content types (+ cleanups)Daniel Watkins
The cleanups, specifically, are to sort the list of content types, and remove trailing whitespace.
2019-08-19Add GitHub pull request template to point people at hacking docDaniel Watkins
This will hopefully avoid people submitting PRs against our mirror repo. (Thanks to GitHub user @max06 for this suggestion!)
2019-08-16cloudinit/distros/parsers/sys_conf: add docstring to SysConfDaniel Watkins
2019-08-15pyflakes: remove unused variableJoshua Powers