From aa1014cae2e326109581d4624f3a195a89369fd7 Mon Sep 17 00:00:00 2001 From: Antti Myyrä Date: Thu, 7 Jan 2021 17:33:43 +0200 Subject: doc: document missing IPv6 subnet types (#744) Added some missing IPv6 subnet configuration types (ipv6_dhcpv6-stateful, ipv6_dhcpv6-stateless, ipv6_slaac) to Networking config v1 documentation. --- doc/rtd/topics/network-config-format-v1.rst | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'doc/rtd/topics/network-config-format-v1.rst') diff --git a/doc/rtd/topics/network-config-format-v1.rst b/doc/rtd/topics/network-config-format-v1.rst index 92e81897..17732c2a 100644 --- a/doc/rtd/topics/network-config-format-v1.rst +++ b/doc/rtd/topics/network-config-format-v1.rst @@ -414,9 +414,19 @@ Subnet types are one of the following: - ``dhcp6``: Configure this interface with IPv6 dhcp. - ``static``: Configure this interface with a static IPv4. - ``static6``: Configure this interface with a static IPv6 . +- ``ipv6_dhcpv6-stateful``: Configure this interface with ``dhcp6`` +- ``ipv6_dhcpv6-stateless``: Configure this interface with SLAAC and DHCP +- ``ipv6_slaac``: Configure address with SLAAC -When making use of ``dhcp`` types, no additional configuration is needed in -the subnet dictionary. +When making use of ``dhcp`` or either of the ``ipv6_dhcpv6`` types, +no additional configuration is needed in the subnet dictionary. + +Using ``ipv6_dhcpv6-stateless`` or ``ipv6_slaac`` allows the IPv6 address to be +automatically configured with StateLess Address AutoConfiguration (`SLAAC`_). +SLAAC requires support from the network, so verify that your cloud or network +offering has support before trying it out. With ``ipv6_dhcpv6-stateless``, +DHCPv6 is still used to fetch other subnet details such as gateway or DNS +servers. If you only want to discover the address, use ``ipv6_slaac``. **Subnet DHCP Example**:: @@ -603,4 +613,6 @@ Some more examples to explore the various options available. - dellstack type: nameserver +.. _SLAAC: https://tools.ietf.org/html/rfc4862 + .. vi: textwidth=78 -- cgit v1.2.3 From abd2da5777195e7e432b0d53a3f7f29d071dd50e Mon Sep 17 00:00:00 2001 From: James Falcon Date: Thu, 17 Jun 2021 16:44:55 -0500 Subject: Fix DNS in NetworkState (SC-133) (#923) v1 network config currently has no concept of interface-specific DNS, which is required for certain renderers. To fix this, added an optional 'interface' key on the v1 nameserver definition. If specified, it makes the DNS settings specific to the interface. Otherwise, it will be defined as global DNS as it always has. Additionally, DNS for v2 wasn't being recognized correctly. For DNS defined on a particular interface, these settings now also go into the global DNS settings as they were intended. --- cloudinit/net/network_state.py | 66 ++++++++++++++---- cloudinit/net/tests/test_network_state.py | 103 ++++++++++++++++++++++++++++ doc/rtd/topics/network-config-format-v1.rst | 5 ++ 3 files changed, 159 insertions(+), 15 deletions(-) (limited to 'doc/rtd/topics/network-config-format-v1.rst') diff --git a/cloudinit/net/network_state.py b/cloudinit/net/network_state.py index e8bf9e39..8018cfb9 100644 --- a/cloudinit/net/network_state.py +++ b/cloudinit/net/network_state.py @@ -237,6 +237,7 @@ class NetworkStateInterpreter(metaclass=CommandHandlerMeta): self._network_state = copy.deepcopy(self.initial_network_state) self._network_state['config'] = config self._parsed = False + self._interface_dns_map = {} @property def network_state(self): @@ -310,6 +311,21 @@ class NetworkStateInterpreter(metaclass=CommandHandlerMeta): LOG.warning("Skipping invalid command: %s", command, exc_info=True) LOG.debug(self.dump_network_state()) + for interface, dns in self._interface_dns_map.items(): + iface = None + try: + iface = self._network_state['interfaces'][interface] + except KeyError as e: + raise ValueError( + 'Nameserver specified for interface {0}, ' + 'but interface {0} does not exist!'.format(interface) + ) from e + if iface: + nameservers, search = dns + iface['dns'] = { + 'addresses': nameservers, + 'search': search, + } def parse_config_v2(self, skip_broken=True): for command_type, command in self._config.items(): @@ -526,21 +542,40 @@ class NetworkStateInterpreter(metaclass=CommandHandlerMeta): def handle_infiniband(self, command): self.handle_physical(command) - @ensure_command_keys(['address']) - def handle_nameserver(self, command): - dns = self._network_state.get('dns') + def _parse_dns(self, command): + nameservers = [] + search = [] if 'address' in command: addrs = command['address'] if not type(addrs) == list: addrs = [addrs] for addr in addrs: - dns['nameservers'].append(addr) + nameservers.append(addr) if 'search' in command: paths = command['search'] if not isinstance(paths, list): paths = [paths] for path in paths: - dns['search'].append(path) + search.append(path) + return nameservers, search + + @ensure_command_keys(['address']) + def handle_nameserver(self, command): + dns = self._network_state.get('dns') + nameservers, search = self._parse_dns(command) + if 'interface' in command: + self._interface_dns_map[command['interface']] = ( + nameservers, search + ) + else: + dns['nameservers'].extend(nameservers) + dns['search'].extend(search) + + @ensure_command_keys(['address']) + def _handle_individual_nameserver(self, command, iface): + _iface = self._network_state.get('interfaces') + nameservers, search = self._parse_dns(command) + _iface[iface]['dns'] = {'nameservers': nameservers, 'search': search} @ensure_command_keys(['destination']) def handle_route(self, command): @@ -706,16 +741,17 @@ class NetworkStateInterpreter(metaclass=CommandHandlerMeta): def _v2_common(self, cfg): LOG.debug('v2_common: handling config:\n%s', cfg) - if 'nameservers' in cfg: - search = cfg.get('nameservers').get('search', []) - dns = cfg.get('nameservers').get('addresses', []) - name_cmd = {'type': 'nameserver'} - if len(search) > 0: - name_cmd.update({'search': search}) - if len(dns) > 0: - name_cmd.update({'addresses': dns}) - LOG.debug('v2(nameserver) -> v1(nameserver):\n%s', name_cmd) - self.handle_nameserver(name_cmd) + for iface, dev_cfg in cfg.items(): + if 'nameservers' in dev_cfg: + search = dev_cfg.get('nameservers').get('search', []) + dns = dev_cfg.get('nameservers').get('addresses', []) + name_cmd = {'type': 'nameserver'} + if len(search) > 0: + name_cmd.update({'search': search}) + if len(dns) > 0: + name_cmd.update({'address': dns}) + self.handle_nameserver(name_cmd) + self._handle_individual_nameserver(name_cmd, iface) def _handle_bond_bridge(self, command, cmd_type=None): """Common handler for bond and bridge types""" diff --git a/cloudinit/net/tests/test_network_state.py b/cloudinit/net/tests/test_network_state.py index 07d726e2..fc4724a1 100644 --- a/cloudinit/net/tests/test_network_state.py +++ b/cloudinit/net/tests/test_network_state.py @@ -2,12 +2,62 @@ from unittest import mock +import pytest + +from cloudinit import safeyaml from cloudinit.net import network_state from cloudinit.tests.helpers import CiTestCase netstate_path = 'cloudinit.net.network_state' +_V1_CONFIG_NAMESERVERS = """\ +network: + version: 1 + config: + - type: nameserver + interface: {iface} + address: + - 192.168.1.1 + - 8.8.8.8 + search: + - spam.local + - type: nameserver + address: + - 192.168.1.0 + - 4.4.4.4 + search: + - eggs.local + - type: physical + name: eth0 + mac_address: '00:11:22:33:44:55' + - type: physical + name: eth1 + mac_address: '66:77:88:99:00:11' +""" + +V1_CONFIG_NAMESERVERS_VALID = _V1_CONFIG_NAMESERVERS.format(iface='eth1') +V1_CONFIG_NAMESERVERS_INVALID = _V1_CONFIG_NAMESERVERS.format(iface='eth90') + +V2_CONFIG_NAMESERVERS = """\ +network: + version: 2 + ethernets: + eth0: + match: + macaddress: '00:11:22:33:44:55' + nameservers: + search: [spam.local, eggs.local] + addresses: [8.8.8.8] + eth1: + match: + macaddress: '66:77:88:99:00:11' + nameservers: + search: [foo.local, bar.local] + addresses: [4.4.4.4] +""" + + class TestNetworkStateParseConfig(CiTestCase): def setUp(self): @@ -55,4 +105,57 @@ class TestNetworkStateParseConfigV2(CiTestCase): self.assertEqual(ncfg, nsi.as_dict()['config']) +class TestNetworkStateParseNameservers: + def _parse_network_state_from_config(self, config): + yaml = safeyaml.load(config) + return network_state.parse_net_config_data(yaml['network']) + + def test_v1_nameservers_valid(self): + config = self._parse_network_state_from_config( + V1_CONFIG_NAMESERVERS_VALID) + + # If an interface was specified, DNS shouldn't be in the global list + assert ['192.168.1.0', '4.4.4.4'] == sorted( + config.dns_nameservers) + assert ['eggs.local'] == config.dns_searchdomains + + # If an interface was specified, DNS should be part of the interface + for iface in config.iter_interfaces(): + if iface['name'] == 'eth1': + assert iface['dns']['addresses'] == ['192.168.1.1', '8.8.8.8'] + assert iface['dns']['search'] == ['spam.local'] + else: + assert 'dns' not in iface + + def test_v1_nameservers_invalid(self): + with pytest.raises(ValueError): + self._parse_network_state_from_config( + V1_CONFIG_NAMESERVERS_INVALID) + + def test_v2_nameservers(self): + config = self._parse_network_state_from_config(V2_CONFIG_NAMESERVERS) + + # Ensure DNS defined on interface exists on interface + for iface in config.iter_interfaces(): + if iface['name'] == 'eth0': + assert iface['dns'] == { + 'nameservers': ['8.8.8.8'], + 'search': ['spam.local', 'eggs.local'], + } + else: + assert iface['dns'] == { + 'nameservers': ['4.4.4.4'], + 'search': ['foo.local', 'bar.local'] + } + + # Ensure DNS defined on interface also exists globally (since there + # is no global DNS definitions in v2) + assert ['4.4.4.4', '8.8.8.8'] == sorted(config.dns_nameservers) + assert [ + 'bar.local', + 'eggs.local', + 'foo.local', + 'spam.local', + ] == sorted(config.dns_searchdomains) + # vi: ts=4 expandtab diff --git a/doc/rtd/topics/network-config-format-v1.rst b/doc/rtd/topics/network-config-format-v1.rst index 17732c2a..3202163b 100644 --- a/doc/rtd/topics/network-config-format-v1.rst +++ b/doc/rtd/topics/network-config-format-v1.rst @@ -335,6 +335,10 @@ the following keys: - ``address``: List of IPv4 or IPv6 address of nameservers. - ``search``: List of of hostnames to include in the resolv.conf search path. +- ``interface``: Optional. Ties the nameserver definition to the specified + interface. The value specified here must match the `name` of an interface + defined in this config. If unspecified, this nameserver will be considered + a global nameserver. **Nameserver Example**:: @@ -349,6 +353,7 @@ the following keys: address: 192.168.23.14/27 gateway: 192.168.23.1 - type: nameserver + interface: interface0 # Ties nameserver to interface0 only address: - 192.168.23.2 - 8.8.8.8 -- cgit v1.2.3 From cd40789a583c38423cea76355b375aa838893292 Mon Sep 17 00:00:00 2001 From: James Falcon Date: Mon, 6 Dec 2021 17:17:49 -0600 Subject: docs: Make MACs lowercase in network config (#1135) LP: #1876941 --- doc/rtd/topics/network-config-format-v1.rst | 3 ++- doc/rtd/topics/network-config-format-v2.rst | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'doc/rtd/topics/network-config-format-v1.rst') diff --git a/doc/rtd/topics/network-config-format-v1.rst b/doc/rtd/topics/network-config-format-v1.rst index 3202163b..4c013d92 100644 --- a/doc/rtd/topics/network-config-format-v1.rst +++ b/doc/rtd/topics/network-config-format-v1.rst @@ -62,7 +62,8 @@ structure. **mac_address**: ** The MAC Address is a device unique identifier that most Ethernet-based network -devices possess. Specifying a MAC Address is optional. +devices possess. Specifying a MAC Address is optional. +Letters must be lowercase. .. note:: diff --git a/doc/rtd/topics/network-config-format-v2.rst b/doc/rtd/topics/network-config-format-v2.rst index af65a4ce..8b040ed2 100644 --- a/doc/rtd/topics/network-config-format-v2.rst +++ b/doc/rtd/topics/network-config-format-v2.rst @@ -107,7 +107,8 @@ NetworkManager does not. **macaddress**: *<(scalar)>* -Device's MAC address in the form XX:XX:XX:XX:XX:XX. Globs are not allowed. +Device's MAC address in the form xx:xx:xx:xx:xx:xx. Globs are not allowed. +Letters must be lowercase. .. note:: @@ -131,7 +132,7 @@ supported. Matching on driver is *only* supported with networkd. # fixed MAC address match: - macaddress: 11:22:33:AA:BB:FF + macaddress: 11:22:33:aa:bb:ff # first card of driver ``ixgbe`` match: -- cgit v1.2.3 From 7522845dfe8851b7b4f3e9924810b9ccf282bb6e Mon Sep 17 00:00:00 2001 From: Brett Holman Date: Wed, 2 Feb 2022 14:21:00 -0700 Subject: spell check docs with spellintian (#1223) Fix spelling errors - Add Makefile target that checks for spelling errors - Add Makefile target that fixes spelling errors - Add spelling check to travis doc tests - Fix various spelling errors in the docs --- .travis.yml | 7 +++++ Makefile | 39 +++++++++++++++++++++++++- doc/examples/cloud-config-disk-setup.txt | 4 +-- doc/examples/cloud-config-install-packages.txt | 2 +- doc/examples/cloud-config-landscape.txt | 2 +- doc/examples/cloud-config-mount-points.txt | 2 +- doc/examples/cloud-config-power-state.txt | 2 +- doc/examples/cloud-config-user-groups.txt | 2 +- doc/examples/cloud-config.txt | 10 +++---- doc/examples/kernel-cmdline.txt | 2 +- doc/examples/seed/README | 2 +- doc/examples/seed/meta-data | 2 +- doc/rtd/conf.py | 2 +- doc/rtd/topics/datasources.rst | 2 +- doc/rtd/topics/datasources/smartos.rst | 2 +- doc/rtd/topics/datasources/vmware.rst | 2 +- doc/rtd/topics/datasources/vultr.rst | 2 +- doc/rtd/topics/faq.rst | 6 ++-- doc/rtd/topics/instancedata.rst | 4 +-- doc/rtd/topics/network-config-format-v1.rst | 4 +-- doc/sources/kernel-cmdline.txt | 2 +- doc/sources/ovf/README | 2 +- doc/sources/ovf/make-iso | 2 +- doc/userdata.txt | 2 +- 24 files changed, 76 insertions(+), 32 deletions(-) (limited to 'doc/rtd/topics/network-config-format-v1.rst') diff --git a/.travis.yml b/.travis.yml index d10c912c..2e79f2b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -140,6 +140,13 @@ matrix: env: TOXENV=isort - python: 3.7 env: TOXENV=doc + install: + - git fetch --unshallow + - sudo apt-get install lintian + - pip install tox + script: + - make check_spelling + - tox # Test all supported Python versions (but at the end, so we schedule # longer-running jobs first) - python: "3.10.1" diff --git a/Makefile b/Makefile index 0c015dae..4ead786f 100644 --- a/Makefile +++ b/Makefile @@ -83,6 +83,43 @@ deb-src: doc: tox -e doc +# Spell check && filter false positives +_CHECK_SPELLING := find doc -type f -exec spellintian {} + | \ + grep -v -e 'doc/rtd/topics/cli.rst: modules modules' \ + -e 'doc/examples/cloud-config-mcollective.txt: WARNING WARNING' \ + -e 'doc/examples/cloud-config-power-state.txt: Bye Bye' \ + -e 'doc/examples/cloud-config.txt: Bye Bye' + + +# For CI we require a failing return code when spellintian finds spelling errors +check_spelling: + @! $(_CHECK_SPELLING) + +# Manipulate the output of spellintian into a valid "sed" command which is run +# to fix the error +# +# Example spellintian output: +# +# doc/examples/kernel-cmdline.txt: everthing -> everything +# +# The "fix_spelling" target manipulates the above output into the following command +# and runs that command. +# +# sed -i "s/everthing/everything/g" doc/examples/kernel-cmdline.txt +# +# awk notes: +# +# -F ': | -> ' means use the strings ": " or " -> " as field delimeters +# \046 is octal for double quote +# $$2 will contain the second field, ($ must be escaped because this is in a Makefile) +# +# Limitation: duplicate words with newline between them are not automatically fixed +fix_spelling: + @$(_CHECK_SPELLING) | \ + sed 's/ (duplicate word)//g' | \ + awk -F ': | -> ' '{printf "sed -i \047s/%s/%s/g\047 %s\n", $$2, $$3, $$1}' | \ + sh + .PHONY: test flake8 clean rpm srpm deb deb-src yaml .PHONY: check_version pip-test-requirements pip-requirements clean_pyc -.PHONY: unittest style-check doc +.PHONY: unittest style-check doc fix_spelling check_spelling diff --git a/doc/examples/cloud-config-disk-setup.txt b/doc/examples/cloud-config-disk-setup.txt index a36e6cfb..08cf5d8b 100644 --- a/doc/examples/cloud-config-disk-setup.txt +++ b/doc/examples/cloud-config-disk-setup.txt @@ -207,7 +207,7 @@ fs_setup: # as a partition value. However, ephermalX.0 is the _same_ as ephemeralX. # # : -# Partition definitions are overwriten if you use the '.Y' notation. +# Partition definitions are overwritten if you use the '.Y' notation. # # The valid options are: # "auto|any": tell cloud-init not to care whether there is a partition @@ -243,7 +243,7 @@ fs_setup: # # In general, if you have a specific partition configuration in mind, # you should define either the device or the partition number. 'auto' -# and 'any' are specifically intended for formating ephemeral storage or +# and 'any' are specifically intended for formatting ephemeral storage or # for simple schemes. # # "none": Put the file system directly on the device. diff --git a/doc/examples/cloud-config-install-packages.txt b/doc/examples/cloud-config-install-packages.txt index 2edc63da..7b90d7df 100644 --- a/doc/examples/cloud-config-install-packages.txt +++ b/doc/examples/cloud-config-install-packages.txt @@ -7,7 +7,7 @@ # if packages are specified, this apt_update will be set to true # # packages may be supplied as a single package name or as a list -# with the format [, ] wherein the specifc +# with the format [, ] wherein the specific # package version will be installed. packages: - pwgen diff --git a/doc/examples/cloud-config-landscape.txt b/doc/examples/cloud-config-landscape.txt index 88be57ce..b76bf028 100644 --- a/doc/examples/cloud-config-landscape.txt +++ b/doc/examples/cloud-config-landscape.txt @@ -2,7 +2,7 @@ # Landscape-client configuration # # Anything under the top 'landscape: client' entry -# will be basically rendered into a ConfigObj formated file +# will be basically rendered into a ConfigObj formatted file # under the '[client]' section of /etc/landscape/client.conf # # Note: 'tags' should be specified as a comma delimited string diff --git a/doc/examples/cloud-config-mount-points.txt b/doc/examples/cloud-config-mount-points.txt index 43f80ec9..d0ad8383 100644 --- a/doc/examples/cloud-config-mount-points.txt +++ b/doc/examples/cloud-config-mount-points.txt @@ -19,7 +19,7 @@ # # - if a device does not exist at the time, an entry will still be # written to /etc/fstab. -# - '/dev' can be ommitted for device names that begin with: xvd, sd, hd, vd +# - '/dev' can be omitted for device names that begin with: xvd, sd, hd, vd # - if an entry does not have all 6 fields, they will be filled in # with values from 'mount_default_fields' below. # diff --git a/doc/examples/cloud-config-power-state.txt b/doc/examples/cloud-config-power-state.txt index 002707ec..0bbb10e2 100644 --- a/doc/examples/cloud-config-power-state.txt +++ b/doc/examples/cloud-config-power-state.txt @@ -4,7 +4,7 @@ # default: none # # power_state can be used to make the system shutdown, reboot or -# halt after boot is finished. This same thing can be acheived by +# halt after boot is finished. This same thing can be achieved by # user-data scripts or by runcmd by simply invoking 'shutdown'. # # Doing it this way ensures that cloud-init is entirely finished with diff --git a/doc/examples/cloud-config-user-groups.txt b/doc/examples/cloud-config-user-groups.txt index 30cd3f97..aec70688 100644 --- a/doc/examples/cloud-config-user-groups.txt +++ b/doc/examples/cloud-config-user-groups.txt @@ -118,7 +118,7 @@ users: # command available on Ubuntu systems. If the user has an account # on the Ubuntu SSO, specifying the email will allow snap to # request a username and any public ssh keys and will import -# these into the system with username specifed by SSO account. +# these into the system with username specified by SSO account. # If 'username' is not set in SSO, then username will be the # shortname before the email domain. # diff --git a/doc/examples/cloud-config.txt b/doc/examples/cloud-config.txt index de9a0f87..a2b4a3fa 100644 --- a/doc/examples/cloud-config.txt +++ b/doc/examples/cloud-config.txt @@ -42,7 +42,7 @@ packages: # # - if a device does not exist at the time, an entry will still be # written to /etc/fstab. -# - '/dev' can be ommitted for device names that begin with: xvd, sd, hd, vd +# - '/dev' can be omitted for device names that begin with: xvd, sd, hd, vd # - if an entry does not have all 6 fields, they will be filled in # with values from 'mount_default_fields' below. # @@ -258,7 +258,7 @@ locale: en_US.UTF-8 locale_configfile: /etc/default/locale # add entries to rsyslog configuration -# The first occurance of a given filename will truncate. +# The first occurrence of a given filename will truncate. # subsequent entries will append. # if value is a scalar, its content is assumed to be 'content', and the # default filename is used. @@ -272,7 +272,7 @@ rsyslog: - filename: 01-examplecom.conf content: "*.* @@syslogd.example.com" -# resize_rootfs should the / filesytem be resized on first boot +# resize_rootfs should the / filesystem be resized on first boot # this allows you to launch an instance with a larger disk / partition # and have the instance automatically grow / to accomoddate it # set to 'False' to disable @@ -339,7 +339,7 @@ resize_rootfs: True # /etc/cloud/templates/hosts.tmpl. # The strings '$hostname' and '$fqdn' are replaced in the template # with the appropriate values. -# To make modifications persistant across a reboot, you must make +# To make modifications persistent across a reboot, you must make # modificatoins to /etc/cloud/templates/hosts.tmpl # # localhost: @@ -509,7 +509,7 @@ manual_cache_clean: False # default: none # # power_state can be used to make the system shutdown, reboot or -# halt after boot is finished. This same thing can be acheived by +# halt after boot is finished. This same thing can be achieved by # user-data scripts or by runcmd by simply invoking 'shutdown'. # # Doing it this way ensures that cloud-init is entirely finished with diff --git a/doc/examples/kernel-cmdline.txt b/doc/examples/kernel-cmdline.txt index 805bc3d3..8eee86b2 100644 --- a/doc/examples/kernel-cmdline.txt +++ b/doc/examples/kernel-cmdline.txt @@ -7,7 +7,7 @@ The format is: cloud-config will consider any content after 'cc:' to be cloud-config data. If an 'end_cc' string is present, then it will stop reading there. -otherwise it considers everthing after 'cc:' to be cloud-config content. +otherwise it considers everything after 'cc:' to be cloud-config content. In order to allow carriage returns, you must enter '\\n', literally, on the command line two backslashes followed by a letter 'n'. diff --git a/doc/examples/seed/README b/doc/examples/seed/README index cc15839e..b0d97afd 100644 --- a/doc/examples/seed/README +++ b/doc/examples/seed/README @@ -15,7 +15,7 @@ The directory must have both files. This is the user data, as would be consumed from ec2's metadata service see examples in doc/examples. - meta-data: - This file is yaml formated data similar to what is in the ec2 metadata + This file is yaml formatted data similar to what is in the ec2 metadata service under meta-data/. See the example, or, on an ec2 instance, run: python -c 'import boto.utils, yaml; print( diff --git a/doc/examples/seed/meta-data b/doc/examples/seed/meta-data index d0551448..38baca9a 100644 --- a/doc/examples/seed/meta-data +++ b/doc/examples/seed/meta-data @@ -1,4 +1,4 @@ -# this is yaml formated data +# this is yaml formatted data # it is expected to be roughly what you would get from running the following # on an ec2 instance: # python -c 'import boto.utils, yaml; print(yaml.dump(boto.utils.get_instance_metadata()))' diff --git a/doc/rtd/conf.py b/doc/rtd/conf.py index d2cb6ae1..9976afa4 100644 --- a/doc/rtd/conf.py +++ b/doc/rtd/conf.py @@ -12,7 +12,7 @@ sys.path.insert(0, os.path.abspath("./")) sys.path.insert(0, os.path.abspath(".")) -# Supress warnings for docs that aren't used yet +# Suppress warnings for docs that aren't used yet # unused_docs = [ # ] diff --git a/doc/rtd/topics/datasources.rst b/doc/rtd/topics/datasources.rst index 0ebc0f32..4d9a3eca 100644 --- a/doc/rtd/topics/datasources.rst +++ b/doc/rtd/topics/datasources.rst @@ -99,7 +99,7 @@ need to take care of the following items: your datasource module name to the end of the ``datasource_list`` entry in ``cloudinit/settings.py``. -* **Add your your cloud platform to apport collection prompts:** Update the +* **Add your cloud platform to apport collection prompts:** Update the list of cloud platforms in ``cloudinit/apport.py``. This list will be provided to the user who invokes ``ubuntu-bug cloud-init``. diff --git a/doc/rtd/topics/datasources/smartos.rst b/doc/rtd/topics/datasources/smartos.rst index be11dfbb..6c53f684 100644 --- a/doc/rtd/topics/datasources/smartos.rst +++ b/doc/rtd/topics/datasources/smartos.rst @@ -13,7 +13,7 @@ SmartOS Platform The SmartOS virtualization platform uses meta-data to the instance via the second serial console. On Linux, this is /dev/ttyS1. The data is a provided via a simple protocol: something queries for the data, the console responds -responds with the status and if "SUCCESS" returns until a single ".\n". +with the status and if "SUCCESS" returns until a single ".\n". New versions of the SmartOS tooling will include support for base64 encoded data. diff --git a/doc/rtd/topics/datasources/vmware.rst b/doc/rtd/topics/datasources/vmware.rst index 3ca9f10f..df5bf5aa 100644 --- a/doc/rtd/topics/datasources/vmware.rst +++ b/doc/rtd/topics/datasources/vmware.rst @@ -333,7 +333,7 @@ Setting the instance ID ^^^^^^^^^^^^^^^^^^^^^^^ The instance ID may be set by way of the metadata key ``instance-id``. However, -if this value is absent then then the instance ID is read from the file +if this value is absent then the instance ID is read from the file ``/sys/class/dmi/id/product_uuid``. Providing public SSH keys diff --git a/doc/rtd/topics/datasources/vultr.rst b/doc/rtd/topics/datasources/vultr.rst index e73406a8..9a5bbf96 100644 --- a/doc/rtd/topics/datasources/vultr.rst +++ b/doc/rtd/topics/datasources/vultr.rst @@ -21,7 +21,7 @@ Vultr's datasource can be configured as follows: timeout: 2 wait: 2 -- *url*: The URL used to aquire the metadata configuration from +- *url*: The URL used to acquire the metadata configuration from - *retries*: Determines the number of times to attempt to connect to the metadata service - *timeout*: Determines the timeout in seconds to wait for a response from the diff --git a/doc/rtd/topics/faq.rst b/doc/rtd/topics/faq.rst index efc532de..125ce9f4 100644 --- a/doc/rtd/topics/faq.rst +++ b/doc/rtd/topics/faq.rst @@ -56,7 +56,7 @@ instance -------- The `/var/lib/cloud/instance` directory is a symbolic link that points -to the most recenlty used instance-id directory. This folder contains the +to the most recently used instance-id directory. This folder contains the information cloud-init received from datasources, including vendor and user data. This can be helpful to review to ensure the correct data was passed. @@ -74,9 +74,9 @@ previous boot: * `instance-id`: id of the instance as discovered by cloud-init. Changing this file has no effect. * `result.json`: json file will show both the datasource used to setup - the instance, and if any errors occured + the instance, and if any errors occurred * `status.json`: json file shows the datasource used and a break down - of all four modules if any errors occured and the start and stop times. + of all four modules if any errors occurred and the start and stop times. What datasource am I using? =========================== diff --git a/doc/rtd/topics/instancedata.rst b/doc/rtd/topics/instancedata.rst index c33b907a..2d6719fd 100644 --- a/doc/rtd/topics/instancedata.rst +++ b/doc/rtd/topics/instancedata.rst @@ -30,7 +30,7 @@ deployed with cloud-init: * simple static object to query to obtain a instance's metadata * speed: avoid costly network transactions for metadata that is already cached - on the filesytem + on the filesystem * reduce need to recrawl metadata services for static metadata that is already cached * leverage cloud-init's best practices for crawling cloud-metadata services @@ -180,7 +180,7 @@ Example output: v1.platform ------------- -An attempt to identify the cloud platfrom instance that the system is running +An attempt to identify the cloud platform instance that the system is running on. Examples output: diff --git a/doc/rtd/topics/network-config-format-v1.rst b/doc/rtd/topics/network-config-format-v1.rst index 4c013d92..a3beccbd 100644 --- a/doc/rtd/topics/network-config-format-v1.rst +++ b/doc/rtd/topics/network-config-format-v1.rst @@ -48,7 +48,7 @@ the key ``subnets``. Physical ~~~~~~~~ The ``physical`` type configuration represents a "physical" network device, -typically Ethernet-based. At least one of of these entries is required for +typically Ethernet-based. At least one of these entries is required for external network connectivity. Type ``physical`` requires only one key: ``name``. A ``physical`` device may contain some or all of the following keys: @@ -335,7 +335,7 @@ Users can specify a ``nameserver`` type. Nameserver dictionaries include the following keys: - ``address``: List of IPv4 or IPv6 address of nameservers. -- ``search``: List of of hostnames to include in the resolv.conf search path. +- ``search``: List of hostnames to include in the resolv.conf search path. - ``interface``: Optional. Ties the nameserver definition to the specified interface. The value specified here must match the `name` of an interface defined in this config. If unspecified, this nameserver will be considered diff --git a/doc/sources/kernel-cmdline.txt b/doc/sources/kernel-cmdline.txt index 0b77a9af..4cbfd217 100644 --- a/doc/sources/kernel-cmdline.txt +++ b/doc/sources/kernel-cmdline.txt @@ -9,7 +9,7 @@ as it requires knowing in advance the correct command line or modifying the boot loader to append data. For example, when 'cloud-init start' runs, it will check to -see if if one of 'cloud-config-url' or 'url' appear in key/value fashion +see if one of 'cloud-config-url' or 'url' appear in key/value fashion in the kernel command line as in: root=/dev/sda ro url=http://foo.bar.zee/abcde diff --git a/doc/sources/ovf/README b/doc/sources/ovf/README index e3ef12e0..3e0b366b 100644 --- a/doc/sources/ovf/README +++ b/doc/sources/ovf/README @@ -53,7 +53,7 @@ box, follow the steps below. You can change that at the grub prompt if you'd like by editing the kernel entry. Otherwise, to see progress you'll need to switch to the serial console. In kvm graphic mode, you do that by clicking - in the window and then pressing pressing 'ctrl-alt-3'. For information + in the window and then pressing 'ctrl-alt-3'. For information on how to do that in virtualbox or kvm curses, see the relevant documentation. diff --git a/doc/sources/ovf/make-iso b/doc/sources/ovf/make-iso index 91d0e2e5..e46642bf 100755 --- a/doc/sources/ovf/make-iso +++ b/doc/sources/ovf/make-iso @@ -28,7 +28,7 @@ Usage() { cat < Date: Thu, 10 Feb 2022 15:44:37 -0600 Subject: minor improvements to documentation (#1259) * Primarily improved grammar for clarity. * A few Sphinx/RST syntax fixes. * Set text width to 79 characters per footer documentation where needed. * Changed "yaml" to "YAML" when used in sentences. --- doc/examples/cloud-config-user-groups.txt | 3 +-- doc/examples/cloud-config-write-files.txt | 2 +- doc/rtd/topics/boot.rst | 14 +++++++------- doc/rtd/topics/cli.rst | 6 +++--- doc/rtd/topics/contributing.rst | 2 +- doc/rtd/topics/datasources.rst | 12 ++++++------ doc/rtd/topics/datasources/aliyun.rst | 2 +- doc/rtd/topics/datasources/altcloud.rst | 2 +- doc/rtd/topics/datasources/azure.rst | 2 +- doc/rtd/topics/datasources/cloudsigma.rst | 2 +- doc/rtd/topics/datasources/cloudstack.rst | 2 +- doc/rtd/topics/datasources/configdrive.rst | 2 +- doc/rtd/topics/datasources/digitalocean.rst | 2 +- doc/rtd/topics/datasources/e24cloud.rst | 4 ++-- doc/rtd/topics/datasources/ec2.rst | 2 +- doc/rtd/topics/datasources/fallback.rst | 2 +- doc/rtd/topics/datasources/gce.rst | 2 +- doc/rtd/topics/datasources/lxd.rst | 2 +- doc/rtd/topics/datasources/nocloud.rst | 6 +++--- doc/rtd/topics/datasources/opennebula.rst | 2 +- doc/rtd/topics/datasources/openstack.rst | 8 ++++---- doc/rtd/topics/datasources/oracle.rst | 2 +- doc/rtd/topics/datasources/ovf.rst | 4 ++-- doc/rtd/topics/datasources/rbxcloud.rst | 2 +- doc/rtd/topics/datasources/smartos.rst | 2 +- doc/rtd/topics/datasources/upcloud.rst | 2 +- doc/rtd/topics/datasources/vmware.rst | 2 +- doc/rtd/topics/datasources/vultr.rst | 4 ++-- doc/rtd/topics/datasources/zstack.rst | 2 +- doc/rtd/topics/dir_layout.rst | 2 +- doc/rtd/topics/events.rst | 2 +- doc/rtd/topics/examples.rst | 2 +- doc/rtd/topics/format.rst | 6 +++--- doc/rtd/topics/instancedata.rst | 2 +- doc/rtd/topics/integration_tests.rst | 2 +- doc/rtd/topics/logging.rst | 6 +++--- doc/rtd/topics/merging.rst | 8 ++++---- doc/rtd/topics/modules.rst | 2 +- doc/rtd/topics/network-config-format-eni.rst | 2 +- doc/rtd/topics/network-config-format-v1.rst | 2 +- doc/rtd/topics/network-config-format-v2.rst | 2 +- doc/rtd/topics/network-config.rst | 2 +- doc/rtd/topics/security.rst | 2 +- doc/rtd/topics/vendordata.rst | 2 +- 44 files changed, 72 insertions(+), 73 deletions(-) (limited to 'doc/rtd/topics/network-config-format-v1.rst') diff --git a/doc/examples/cloud-config-user-groups.txt b/doc/examples/cloud-config-user-groups.txt index aec70688..eaa8dd24 100644 --- a/doc/examples/cloud-config-user-groups.txt +++ b/doc/examples/cloud-config-user-groups.txt @@ -95,7 +95,6 @@ users: # provided public-keys. An error will be raised if ssh_authorized_keys # or ssh_import_id is provided for the same user. # -# ssh_authorized_keys. # sudo: Defaults to none. Accepts a sudo rule string, a list of sudo rule # strings or False to explicitly deny sudo usage. Examples: # @@ -125,7 +124,7 @@ users: # Default user creation: # -# Unless you define users, you will get a 'ubuntu' user on ubuntu systems with the +# Unless you define users, you will get a 'ubuntu' user on Ubuntu systems with the # legacy permission (no password sudo, locked user, etc). If however, you want # to have the 'ubuntu' user in addition to other users, you need to instruct # cloud-init that you also want the default user. To do this use the following diff --git a/doc/examples/cloud-config-write-files.txt b/doc/examples/cloud-config-write-files.txt index 6c67c503..c7f95adf 100644 --- a/doc/examples/cloud-config-write-files.txt +++ b/doc/examples/cloud-config-write-files.txt @@ -2,7 +2,7 @@ # vim: syntax=yaml # # This is the configuration syntax that the write_files module -# will know how to understand. encoding can be given b64 or gzip or (gz+b64). +# will know how to understand. Encoding can be given b64 or gzip or (gz+b64). # The content will be decoded accordingly and then written to the path that is # provided. # diff --git a/doc/rtd/topics/boot.rst b/doc/rtd/topics/boot.rst index f7dfcd3a..b904eaf4 100644 --- a/doc/rtd/topics/boot.rst +++ b/doc/rtd/topics/boot.rst @@ -65,10 +65,10 @@ If this is an instance's first boot, then the selected network configuration is rendered. This includes clearing of all previous (stale) configuration including persistent device naming with old mac addresses. -This stage must block network bring-up or any stale configuration might -already have been applied. That could have negative effects such as DHCP -hooks or broadcast of an old hostname. It would also put the system in -an odd state to recover from as it may then have to restart network +This stage must block network bring-up or any stale configuration that might +have already been applied. Otherwise, that could have negative effects such +as DHCP hooks or broadcast of an old hostname. It would also put the system +in an odd state to recover from, as it may then have to restart network devices. Cloud-init then exits and expects for the continued boot of the operating @@ -93,7 +93,7 @@ Network +---------+--------+----------------------------------------------------------+ This stage requires all configured networking to be online, as it will fully -process any user-data that is found. Here, processing means: +process any user-data that is found. Here processing means: * retrieve any ``#include`` or ``#include-once`` (recursively) including http * decompress any compressed content @@ -106,7 +106,7 @@ from sources only available via network. For example, a user may have provided user-data in a network resource that describes how local mounts should be done. -On some clouds such as Azure, this stage will create filesystems to be +On some clouds, such as Azure, this stage will create filesystems to be mounted, including ones that have stale (previous instance) references in ``/etc/fstab``. As such, entries ``/etc/fstab`` other than those necessary for cloud-init to run should not be done until after this stage. @@ -146,7 +146,7 @@ Final This stage runs as late in boot as possible. Any scripts that a user is accustomed to running after logging into a system should run correctly here. -Things that run here include +Things that run here include: * package installations * configuration management plugins (puppet, chef, salt-minion) diff --git a/doc/rtd/topics/cli.rst b/doc/rtd/topics/cli.rst index b6115ed6..e2f48bf0 100644 --- a/doc/rtd/topics/cli.rst +++ b/doc/rtd/topics/cli.rst @@ -17,10 +17,10 @@ option. This can be used against cloud-init itself or any of its subcommands. -h, --help show this help message and exit --version, -v show program's version number and exit --file FILES, -f FILES - additional yaml configuration files to use + additional yaml configuration files to use --debug, -d show additional pre-action logging (default: False) --force force running even if no datasource is found (use at - your own risk) + your own risk) Subcommands: {init,modules,single,query,dhclient-hook,features,analyze,devel,collect-logs,clean,status} @@ -115,7 +115,7 @@ Current subcommands: containing the jinja template header ``## template: jinja`` and renders that content with any instance-data.json variables present. * ``schema``: a **#cloud-config** format and schema - validator. It accepts a cloud-config yaml file and annotates potential + validator. It accepts a cloud-config YAML file and annotates potential schema errors locally without the need for deployment. Schema validation is work in progress and supports a subset of cloud-config modules. diff --git a/doc/rtd/topics/contributing.rst b/doc/rtd/topics/contributing.rst index c9e88dbb..b9aee867 100644 --- a/doc/rtd/topics/contributing.rst +++ b/doc/rtd/topics/contributing.rst @@ -1,2 +1,2 @@ .. include:: ../../../CONTRIBUTING.rst -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources.rst b/doc/rtd/topics/datasources.rst index 4d9a3eca..f73a5b2a 100644 --- a/doc/rtd/topics/datasources.rst +++ b/doc/rtd/topics/datasources.rst @@ -4,9 +4,9 @@ Datasources *********** Datasources are sources of configuration data for cloud-init that typically -come from the user (e.g. userdata) or come from the cloud that created the -configuration drive (e.g. metadata). Typical userdata would include files, -yaml, and shell scripts while typical metadata would include server name, +come from the user (i.e. userdata) or come from the cloud that created the +configuration drive (i.e. metadata). Typical userdata would include files, +YAML, and shell scripts while typical metadata would include server name, instance id, display name and other cloud specific details. Since there are multiple ways to provide this data (each cloud solution seems @@ -29,13 +29,13 @@ The following is a list of documents for each supported datasource: datasources/aliyun.rst datasources/altcloud.rst + datasources/ec2.rst datasources/azure.rst datasources/cloudsigma.rst datasources/cloudstack.rst datasources/configdrive.rst datasources/digitalocean.rst datasources/e24cloud.rst - datasources/ec2.rst datasources/exoscale.rst datasources/fallback.rst datasources/gce.rst @@ -49,9 +49,9 @@ The following is a list of documents for each supported datasource: datasources/rbxcloud.rst datasources/smartos.rst datasources/upcloud.rst - datasources/zstack.rst - datasources/vultr.rst datasources/vmware.rst + datasources/vultr.rst + datasources/zstack.rst Creation ======== diff --git a/doc/rtd/topics/datasources/aliyun.rst b/doc/rtd/topics/datasources/aliyun.rst index 587bd4f4..0bb9c19e 100644 --- a/doc/rtd/topics/datasources/aliyun.rst +++ b/doc/rtd/topics/datasources/aliyun.rst @@ -86,4 +86,4 @@ If no user-data is provided, this will return a 404. #!/bin/sh echo "Hello World." -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/altcloud.rst b/doc/rtd/topics/datasources/altcloud.rst index 9d7e3de1..acd5e2a3 100644 --- a/doc/rtd/topics/datasources/altcloud.rst +++ b/doc/rtd/topics/datasources/altcloud.rst @@ -91,4 +91,4 @@ For more information on Delta Cloud see: http://deltacloud.apache.org .. _RHEVm: https://www.redhat.com/virtualization/rhev/desktop/rhevm/ .. _vSphere: https://www.vmware.com/products/datacenter-virtualization/vsphere/overview.html -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/azure.rst b/doc/rtd/topics/datasources/azure.rst index bc672486..1bd03970 100644 --- a/doc/rtd/topics/datasources/azure.rst +++ b/doc/rtd/topics/datasources/azure.rst @@ -139,4 +139,4 @@ this by setting the hostname in the DataSource's 'get_data' method via behavior can be configured or disabled in the datasource config. See 'Configuration' above. -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/cloudsigma.rst b/doc/rtd/topics/datasources/cloudsigma.rst index 86b834c8..dee665a4 100644 --- a/doc/rtd/topics/datasources/cloudsigma.rst +++ b/doc/rtd/topics/datasources/cloudsigma.rst @@ -39,4 +39,4 @@ value. If this field does not exist the default value is "net". .. _server context: http://cloudsigma-docs.readthedocs.org/en/latest/server_context.html .. _meta field: http://cloudsigma-docs.readthedocs.org/en/latest/meta.html .. _config formats: http://cloudinit.readthedocs.org/en/latest/topics/format.html -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/cloudstack.rst b/doc/rtd/topics/datasources/cloudstack.rst index 325aeeaf..e889ab6e 100644 --- a/doc/rtd/topics/datasources/cloudstack.rst +++ b/doc/rtd/topics/datasources/cloudstack.rst @@ -51,4 +51,4 @@ An example configuration with the default values is provided below: .. _Apache CloudStack: http://cloudstack.apache.org/ .. _CloudStack Administrator Guide: http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/latest/virtual_machines.html#user-data-and-meta-data -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/configdrive.rst b/doc/rtd/topics/datasources/configdrive.rst index 4fcbccee..ecc37df6 100644 --- a/doc/rtd/topics/datasources/configdrive.rst +++ b/doc/rtd/topics/datasources/configdrive.rst @@ -128,4 +128,4 @@ what all can be present here. .. _iso9660: https://en.wikipedia.org/wiki/ISO_9660 .. _vfat: https://en.wikipedia.org/wiki/File_Allocation_Table .. _the config drive extension: https://docs.openstack.org/nova/latest/admin/config-drive.html -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/digitalocean.rst b/doc/rtd/topics/datasources/digitalocean.rst index a4910408..801841c1 100644 --- a/doc/rtd/topics/datasources/digitalocean.rst +++ b/doc/rtd/topics/datasources/digitalocean.rst @@ -29,4 +29,4 @@ DigitalOcean's datasource can be configured as follows: .. _metadata service: https://developers.digitalocean.com/metadata/ .. _Full documentation: https://developers.digitalocean.com/metadata/ -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/e24cloud.rst b/doc/rtd/topics/datasources/e24cloud.rst index de9a4127..2af6634b 100644 --- a/doc/rtd/topics/datasources/e24cloud.rst +++ b/doc/rtd/topics/datasources/e24cloud.rst @@ -2,8 +2,8 @@ E24Cloud ======== -`E24Cloud ` platform provides an AWS Ec2 metadata +`E24Cloud `_ platform provides an AWS Ec2 metadata service clone. It identifies itself to guests using the dmi system-manufacturer (/sys/class/dmi/id/sys_vendor). -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/ec2.rst b/doc/rtd/topics/datasources/ec2.rst index 274ca1e4..94e4158d 100644 --- a/doc/rtd/topics/datasources/ec2.rst +++ b/doc/rtd/topics/datasources/ec2.rst @@ -121,4 +121,4 @@ Notes For example: the primary NIC will have a DHCP route-metric of 100, the next NIC will be 200. -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/fallback.rst b/doc/rtd/topics/datasources/fallback.rst index 2b133fcd..03658f54 100644 --- a/doc/rtd/topics/datasources/fallback.rst +++ b/doc/rtd/topics/datasources/fallback.rst @@ -15,4 +15,4 @@ will be so that the user is not left with an inaccessible instance. **Note:** the instance id that this datasource provides is ``iid-datasource-none``. -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/gce.rst b/doc/rtd/topics/datasources/gce.rst index f3590282..70aefea2 100644 --- a/doc/rtd/topics/datasources/gce.rst +++ b/doc/rtd/topics/datasources/gce.rst @@ -39,4 +39,4 @@ An example configuration with the default values is provided below: .. _GCE metadata docs: https://cloud.google.com/compute/docs/storing-retrieving-metadata#querying -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/lxd.rst b/doc/rtd/topics/datasources/lxd.rst index 3991a4dd..fa2dcf5d 100644 --- a/doc/rtd/topics/datasources/lxd.rst +++ b/doc/rtd/topics/datasources/lxd.rst @@ -62,4 +62,4 @@ datasource for LXD instances with a more direct support for LXD APIs instead of static NoCloud seed files. .. _LXD socket device: https://linuxcontainers.org/lxd/docs/master/dev-lxd -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/nocloud.rst b/doc/rtd/topics/datasources/nocloud.rst index dbe21834..d31f5d0f 100644 --- a/doc/rtd/topics/datasources/nocloud.rst +++ b/doc/rtd/topics/datasources/nocloud.rst @@ -52,7 +52,7 @@ These user-data and meta-data files are expected to be in the following format. Both files are required to be present for it to be considered a valid seed ISO. -Basically, user-data is simply user-data and meta-data is a yaml formatted file +Basically, user-data is simply user-data and meta-data is a YAML formatted file representing what you'd find in the EC2 metadata service. You may also optionally provide a vendor-data file in the following format. @@ -115,7 +115,7 @@ Example metadata: Network configuration can also be provided to cloud-init in either :ref:`network_config_v1` or :ref:`network_config_v2` by providing that -yaml formatted data in a file named ``network-config``. If found, +YAML formatted data in a file named ``network-config``. If found, this file will override a ``network-interfaces`` file. See an example below. Note specifically that this file does not @@ -151,4 +151,4 @@ be network configuration based on the filename. .. _iso9660: https://en.wikipedia.org/wiki/ISO_9660 .. _vfat: https://en.wikipedia.org/wiki/File_Allocation_Table -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/opennebula.rst b/doc/rtd/topics/datasources/opennebula.rst index 9daa0462..65570a53 100644 --- a/doc/rtd/topics/datasources/opennebula.rst +++ b/doc/rtd/topics/datasources/opennebula.rst @@ -153,4 +153,4 @@ Example VM's context section .. _contextualizing VMs: http://opennebula.org/documentation:documentation:cong .. _network configuration: http://opennebula.org/documentation:documentation:cong#network_configuration .. _iso9660: https://en.wikipedia.org/wiki/ISO_9660 -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/openstack.rst b/doc/rtd/topics/datasources/openstack.rst index 62d0fc03..f523c142 100644 --- a/doc/rtd/topics/datasources/openstack.rst +++ b/doc/rtd/topics/datasources/openstack.rst @@ -12,10 +12,10 @@ Discovery To determine whether a platform looks like it may be OpenStack, cloud-init checks the following environment attributes as a potential OpenStack platform: - * Maybe OpenStack if + * Maybe OpenStack if: * **non-x86 cpu architecture**: because DMI data is buggy on some arches - * Is OpenStack **if x86 architecture and ANY** of the following + * Is OpenStack **if x86 architecture and ANY** of the following: * **/proc/1/environ**: Nova-lxd contains *product_name=OpenStack Nova* * **DMI product_name**: Either *Openstack Nova* or *OpenStack Compute* @@ -32,7 +32,7 @@ The settings that may be configured are: * **metadata_urls**: This list of urls will be searched for an OpenStack metadata service. The first entry that successfully returns a 200 response - for /openstack will be selected. (default: ['http://169.254.169.254']). + for /openstack will be selected. (default: ['http://169.254.169.254']) * **max_wait**: the maximum amount of clock time in seconds that should be spent searching metadata_urls. A value less than zero will result in only one request being made, to the first in the list. (default: -1) @@ -90,4 +90,4 @@ Cloud-init will look for a ``cloud-init`` at the vendor_data2 path; if found, settings are applied after (and, hence, overriding) the settings from static vendor data. Both sets of vendor data can be overridden by user data. -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/oracle.rst b/doc/rtd/topics/datasources/oracle.rst index 98c4657c..7e480021 100644 --- a/doc/rtd/topics/datasources/oracle.rst +++ b/doc/rtd/topics/datasources/oracle.rst @@ -46,4 +46,4 @@ An example configuration with the default values is provided below: configure_secondary_nics: false .. _Oracle Compute Infrastructure: https://cloud.oracle.com/ -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/ovf.rst b/doc/rtd/topics/datasources/ovf.rst index bd5df860..d6eb75da 100644 --- a/doc/rtd/topics/datasources/ovf.rst +++ b/doc/rtd/topics/datasources/ovf.rst @@ -41,6 +41,6 @@ The following VMTools configuration options affect cloud-init's behavior on a bo VMWare admin can refer to (https://github.com/canonical/cloud-init/blob/main/cloudinit/sources/helpers/vmware/imc/config.py) and set the customization specification settings. -For more information, see [VMware vSphere Product Documentation](https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vm_admin.doc/GUID-9A5093A5-C54F-4502-941B-3F9C0F573A39.html) and specific VMTools parameters consumed. +For more information, see `VMware vSphere Product Documentation `_ and specific VMTools parameters consumed. -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/rbxcloud.rst b/doc/rtd/topics/datasources/rbxcloud.rst index 52ec02ff..c4b3f2d0 100644 --- a/doc/rtd/topics/datasources/rbxcloud.rst +++ b/doc/rtd/topics/datasources/rbxcloud.rst @@ -22,4 +22,4 @@ is restarted, if the partition exists. For more information see .. _HyperOne Virtual Machine docs: http://www.hyperone.com/ .. _FAT: https://en.wikipedia.org/wiki/File_Allocation_Table -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/smartos.rst b/doc/rtd/topics/datasources/smartos.rst index 6c53f684..55604ffb 100644 --- a/doc/rtd/topics/datasources/smartos.rst +++ b/doc/rtd/topics/datasources/smartos.rst @@ -165,4 +165,4 @@ You can control the disk_setup then in 2 ways: See doc/examples/cloud-config-disk-setup.txt for information on disk_setup. -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/upcloud.rst b/doc/rtd/topics/datasources/upcloud.rst index 0b7a9bb0..75f438ee 100644 --- a/doc/rtd/topics/datasources/upcloud.rst +++ b/doc/rtd/topics/datasources/upcloud.rst @@ -21,4 +21,4 @@ immutable during server's lifetime and can be removed by deleting the server. .. _UpCloud: https://upcloud.com/ .. _metadata service: https://upcloud.com/community/tutorials/upcloud-metadata-service/ -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/vmware.rst b/doc/rtd/topics/datasources/vmware.rst index df5bf5aa..f1f48117 100644 --- a/doc/rtd/topics/datasources/vmware.rst +++ b/doc/rtd/topics/datasources/vmware.rst @@ -18,7 +18,7 @@ GuestInfo Keys ^^^^^^^^^^^^^^ One method of providing meta, user, and vendor data is by setting the following -key/value pairs on a VM's ``extraConfig`` `property `_ : +key/value pairs on a VM's ``extraConfig`` `property `_: .. list-table:: :header-rows: 1 diff --git a/doc/rtd/topics/datasources/vultr.rst b/doc/rtd/topics/datasources/vultr.rst index 9a5bbf96..f8601700 100644 --- a/doc/rtd/topics/datasources/vultr.rst +++ b/doc/rtd/topics/datasources/vultr.rst @@ -5,7 +5,7 @@ Vultr The `Vultr`_ datasource retrieves basic configuration values from the locally accessible `metadata service`_. All data is served over HTTP from the address -169.254.169.254. The endpoints are documented in, +169.254.169.254. The endpoints are documented in `https://www.vultr.com/metadata/ `_ @@ -32,4 +32,4 @@ Vultr's datasource can be configured as follows: .. _Vultr: https://www.vultr.com/ .. _metadata service: https://www.vultr.com/metadata/ -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/datasources/zstack.rst b/doc/rtd/topics/datasources/zstack.rst index 93a2791c..6630ad9f 100644 --- a/doc/rtd/topics/datasources/zstack.rst +++ b/doc/rtd/topics/datasources/zstack.rst @@ -34,4 +34,4 @@ Same as EC2, instance userdata can be queried at user_data password -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/dir_layout.rst b/doc/rtd/topics/dir_layout.rst index ebd63ae7..9d2c9896 100644 --- a/doc/rtd/topics/dir_layout.rst +++ b/doc/rtd/topics/dir_layout.rst @@ -84,4 +84,4 @@ application:: semaphore `files` which are only supposed to run `per-once` (not tied to the instance id). -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/events.rst b/doc/rtd/topics/events.rst index 57797bd9..1a562fb4 100644 --- a/doc/rtd/topics/events.rst +++ b/doc/rtd/topics/events.rst @@ -92,4 +92,4 @@ On every boot, apply network configuration found in the datasource. .. _Cloud-init: https://launchpad.net/cloud-init .. _on Launchpad: https://bugs.launchpad.net/cloud-init/+bug/1936229 -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/examples.rst b/doc/rtd/topics/examples.rst index 97fd616d..8c7071e5 100644 --- a/doc/rtd/topics/examples.rst +++ b/doc/rtd/topics/examples.rst @@ -179,4 +179,4 @@ Grow partitions .. _chef: http://www.chef.io/chef/ .. _puppet: http://puppetlabs.com/ -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/format.rst b/doc/rtd/topics/format.rst index 05580804..6d790b05 100644 --- a/doc/rtd/topics/format.rst +++ b/doc/rtd/topics/format.rst @@ -89,7 +89,7 @@ Include File This content is a ``include`` file. The file contains a list of urls, one per line. Each of the URLs will be read, -and their content will be passed through this same set of rules. Ie, the +and their content will be passed through this same set of rules. I.e., the content read from the URL can be gzipped, mime-multi-part, or plain text. If an error occurs reading a file the remaining files will not be read. @@ -112,7 +112,7 @@ These things include: - *and many more...* .. note:: - This file must be valid yaml syntax. + This file must be valid YAML syntax. See the :ref:`yaml_examples` section for a commented set of examples of supported cloud config formats. @@ -209,4 +209,4 @@ cloud-init from processing user-data. .. [#] See your cloud provider for applicable user-data size limitations... .. _blog: http://foss-boss.blogspot.com/2011/01/advanced-cloud-init-custom-handlers.html -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/instancedata.rst b/doc/rtd/topics/instancedata.rst index 2d6719fd..f08ead69 100644 --- a/doc/rtd/topics/instancedata.rst +++ b/doc/rtd/topics/instancedata.rst @@ -655,4 +655,4 @@ see only redacted values. instance booted on your favorite cloud. See :ref:`cli_devel` for more information. -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/integration_tests.rst b/doc/rtd/topics/integration_tests.rst index 1e910af6..f9f719da 100644 --- a/doc/rtd/topics/integration_tests.rst +++ b/doc/rtd/topics/integration_tests.rst @@ -91,7 +91,7 @@ tests against the image in question. If it's a RHEL8 image, then we would expect Ubuntu-specific tests to fail (and vice versa). To address this, a full image specification can be given. This is of -the form: ``[::[::[::[::]]`` where ``image_id`` is a cloud's image ID, ``os`` is the OS name, and ``release`` is the OS release name. So, for example, Ubuntu 18.04 (Bionic Beaver) on LXD is ``ubuntu:bionic::ubuntu::bionic`` or RHEL 8 on Amazon is diff --git a/doc/rtd/topics/logging.rst b/doc/rtd/topics/logging.rst index 4fd7e28e..a14fb685 100644 --- a/doc/rtd/topics/logging.rst +++ b/doc/rtd/topics/logging.rst @@ -52,9 +52,9 @@ module using the standard python fileConfig format. Cloud-init looks for config for the logging module under the ``logcfg`` key. .. note:: - the logging configuration is not yaml, it is python ``fileConfig`` format, + the logging configuration is not YAML, it is python ``fileConfig`` format, and is passed through directly to the python logging module. please use the - correct syntax for a multi-line string in yaml. + correct syntax for a multi-line string in YAML. By default, cloud-init uses the logging configuration provided in ``/etc/cloud/cloud.cfg.d/05_logging.cfg``. The default python logging @@ -173,4 +173,4 @@ For more information on rsyslog configuration, see :ref:`cc_rsyslog`. .. _python logging config: https://docs.python.org/3/library/logging.config.html#configuration-file-format .. _python logging handlers: https://docs.python.org/3/library/logging.handlers.html .. _python logging formatters: https://docs.python.org/3/library/logging.html#formatter-objects -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/merging.rst b/doc/rtd/topics/merging.rst index 2b5e5dad..204719eb 100644 --- a/doc/rtd/topics/merging.rst +++ b/doc/rtd/topics/merging.rst @@ -6,8 +6,8 @@ Overview ======== This was implemented because it has been a common feature request that there be -a way to specify how cloud-config yaml "dictionaries" provided as user-data are -merged together when there are multiple yaml files to merge together (say when +a way to specify how cloud-config YAML "dictionaries" provided as user-data are +merged together when there are multiple YAML files to merge together (say when performing an #include). Since previously the merging algorithm was very simple and would only overwrite @@ -236,7 +236,7 @@ Other uses ========== In addition to being used for merging user-data sections, the default merging -algorithm for merging 'conf.d' yaml files (which form an initial yaml config +algorithm for merging 'conf.d' YAML files (which form an initial YAML config for cloud-init) was also changed to use this mechanism so its full benefits (and customization) can also be used there as well. Other places that used the previous merging are also, similarly, now extensible (metadata @@ -285,4 +285,4 @@ The second config - bash4 -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/modules.rst b/doc/rtd/topics/modules.rst index 8ee4fe57..093cee61 100644 --- a/doc/rtd/topics/modules.rst +++ b/doc/rtd/topics/modules.rst @@ -64,4 +64,4 @@ Modules .. automodule:: cloudinit.config.cc_users_groups .. automodule:: cloudinit.config.cc_write_files .. automodule:: cloudinit.config.cc_yum_add_repo -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/network-config-format-eni.rst b/doc/rtd/topics/network-config-format-eni.rst index b0904952..94fa0f9e 100644 --- a/doc/rtd/topics/network-config-format-eni.rst +++ b/doc/rtd/topics/network-config-format-eni.rst @@ -17,4 +17,4 @@ Please reference existing `documentation`_ for the .. _Cloud-init: https://launchpad.net/cloud-init .. _documentation: http://manpages.ubuntu.com/manpages/trusty/en/man5/interfaces.5.html -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/network-config-format-v1.rst b/doc/rtd/topics/network-config-format-v1.rst index a3beccbd..68a9cefa 100644 --- a/doc/rtd/topics/network-config-format-v1.rst +++ b/doc/rtd/topics/network-config-format-v1.rst @@ -621,4 +621,4 @@ Some more examples to explore the various options available. .. _SLAAC: https://tools.ietf.org/html/rfc4862 -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/network-config-format-v2.rst b/doc/rtd/topics/network-config-format-v2.rst index 8b040ed2..c1bf05d1 100644 --- a/doc/rtd/topics/network-config-format-v2.rst +++ b/doc/rtd/topics/network-config-format-v2.rst @@ -527,4 +527,4 @@ This is a complex example which shows most available features: :: dhcp4: yes .. _netplan: https://netplan.io -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/network-config.rst b/doc/rtd/topics/network-config.rst index 494b687a..c461a3fe 100644 --- a/doc/rtd/topics/network-config.rst +++ b/doc/rtd/topics/network-config.rst @@ -286,4 +286,4 @@ Example output converting V2 to sysconfig: .. _UpCloud JSON metadata: https://developers.upcloud.com/1.3/8-servers/#metadata-service .. _Vultr JSON metadata: https://www.vultr.com/metadata/ -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/security.rst b/doc/rtd/topics/security.rst index b8386843..48fcb0a5 100644 --- a/doc/rtd/topics/security.rst +++ b/doc/rtd/topics/security.rst @@ -2,4 +2,4 @@ .. mdinclude:: ../../../SECURITY.md -.. vi: textwidth=78 +.. vi: textwidth=79 diff --git a/doc/rtd/topics/vendordata.rst b/doc/rtd/topics/vendordata.rst index 87a899b3..e659c941 100644 --- a/doc/rtd/topics/vendordata.rst +++ b/doc/rtd/topics/vendordata.rst @@ -68,4 +68,4 @@ of input files. That data can then be given to an instance. See 'write-mime-multipart --help' for usage. -.. vi: textwidth=78 +.. vi: textwidth=79 -- cgit v1.2.3