summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Holman <brett.holman@canonical.com>2023-01-31 11:57:03 -0700
committerGitHub <noreply@github.com>2023-01-31 11:57:03 -0700
commite1e1abbb08575c3deb4c9ef83d1d21c76638f2dc (patch)
tree8dcae4ff8e0eafa3a8af53a71822a7dcbd833491
parentaacdff5b9298db2acbb5d10f0a42cb06d2c0a745 (diff)
downloadcloud-init-git-e1e1abbb08575c3deb4c9ef83d1d21c76638f2dc.tar.gz
docs: Clarify networking docs (#1987)
- Add stronger warnings for resolv_conf module. - Add link to lxd network config docs.
-rw-r--r--cloudinit/config/cc_resolv_conf.py18
-rw-r--r--doc/rtd/reference/network-config.rst5
2 files changed, 15 insertions, 8 deletions
diff --git a/cloudinit/config/cc_resolv_conf.py b/cloudinit/config/cc_resolv_conf.py
index 8dbed71e..ce19fff3 100644
--- a/cloudinit/config/cc_resolv_conf.py
+++ b/cloudinit/config/cc_resolv_conf.py
@@ -26,17 +26,23 @@ RESOLVE_CONFIG_TEMPLATE_MAP = {
}
MODULE_DESCRIPTION = """\
+Unless manually editing :file:`/etc/resolv.conf` is the correct way to manage
+nameserver information on your operating system, you do not want to use
+this module. Many distros have moved away from manually editing ``resolv.conf``
+so please verify that this is the preferred nameserver management method for
+your distro before using this module.
+
+Note that using :ref:`network_config` is preferred, rather than using this
+module, when possible.
+
This module is intended to manage resolv.conf in environments where early
configuration of resolv.conf is necessary for further bootstrapping and/or
where configuration management such as puppet or chef own DNS configuration.
-As Debian/Ubuntu will, by default, utilize resolvconf, and similarly Red Hat
-will use sysconfig, this module is likely to be of little use unless those
-are configured correctly.
When using a :ref:`datasource_config_drive` and a RHEL-like system,
resolv.conf will also be managed automatically due to the available
information provided for DNS servers in the :ref:`network_config_v2` format.
-For those that with to have different settings, use this module.
+For those that wish to have different settings, use this module.
In order for the ``resolv_conf`` section to be applied, ``manage_resolv_conf``
must be set ``true``.
@@ -44,10 +50,6 @@ must be set ``true``.
.. note::
For Red Hat with sysconfig, be sure to set PEERDNS=no for all DHCP
enabled NICs.
-
-.. note::
- And, in Ubuntu/Debian it is recommended that DNS be configured via the
- standard /etc/network/interfaces configuration file.
"""
meta: MetaSchema = {
diff --git a/doc/rtd/reference/network-config.rst b/doc/rtd/reference/network-config.rst
index 80ff608e..ea331f1c 100644
--- a/doc/rtd/reference/network-config.rst
+++ b/doc/rtd/reference/network-config.rst
@@ -126,6 +126,10 @@ The following datasources optionally provide network configuration:
- `DigitalOcean JSON metadata`_
+- :ref:`datasource_lxd`
+
+ - `LXD`_
+
- :ref:`datasource_nocloud`
- :ref:`network_config_v1`
@@ -313,6 +317,7 @@ Example output:
.. _Cloud-init: https://launchpad.net/cloud-init
+.. _LXD: https://linuxcontainers.org/lxd/docs/master/cloud-init/#custom-network-configuration
.. _NetworkManager: https://networkmanager.dev
.. _Netplan: https://netplan.io/
.. _DigitalOcean JSON metadata: https://developers.digitalocean.com/documentation/metadata/