From f7aaef405cd87d7d969f28401f3a4a7538d57c76 Mon Sep 17 00:00:00 2001 From: Ani Sinha Date: Thu, 4 May 2023 15:34:43 +0530 Subject: [PATCH 1/7] Revert "Manual revert "Use Network-Manager and Netplan as default renderers for RHEL and Fedora (#1465)"" RH-Author: Ani Sinha RH-MergeRequest: 103: [RHEL8] Support configuring network by NM keyfiles RH-Bugzilla: 2219528 RH-Acked-by: Miroslav Rezanina RH-Commit: [1/7] 65838b451e21f92cf92d2d4967015c48816f82f9 This reverts commit 0616dbd3f523395b619960b67b3b65c2f0ea15f4. This is patch 1 of the two patches that re-enables NM renderer. This change can be ignored while rebasing to latest upstream. X-downstream-only: true Signed-off-by: Ani Sinha --- cloudinit/net/renderers.py | 1 + config/cloud.cfg.tmpl | 3 +++ doc/rtd/reference/network-config.rst | 16 ++++++++++++++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/cloudinit/net/renderers.py b/cloudinit/net/renderers.py index c92b9dcf..022ff938 100644 --- a/cloudinit/net/renderers.py +++ b/cloudinit/net/renderers.py @@ -28,6 +28,7 @@ DEFAULT_PRIORITY = [ "eni", "sysconfig", "netplan", + "network-manager", "freebsd", "netbsd", "openbsd", diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl index 12f32c51..7238c102 100644 --- a/config/cloud.cfg.tmpl +++ b/config/cloud.cfg.tmpl @@ -381,6 +381,9 @@ system_info: {% elif variant in ["dragonfly"] %} network: renderers: ['freebsd'] +{% elif variant in ["fedora"] or is_rhel %} + network: + renderers: ['netplan', 'network-manager', 'networkd', 'sysconfig', 'eni'] {% elif variant == "openmandriva" %} network: renderers: ['network-manager', 'networkd'] diff --git a/doc/rtd/reference/network-config.rst b/doc/rtd/reference/network-config.rst index bc52afa5..ea331f1c 100644 --- a/doc/rtd/reference/network-config.rst +++ b/doc/rtd/reference/network-config.rst @@ -176,6 +176,16 @@ this state, ``cloud-init`` delegates rendering of the configuration to distro-supported formats. The following ``renderers`` are supported in ``cloud-init``: +NetworkManager +-------------- + +`NetworkManager`_ is the standard Linux network configuration tool suite. It +supports a wide range of networking setups. Configuration is typically stored +in :file:`/etc/NetworkManager`. + +It is the default for a number of Linux distributions; notably Fedora, +CentOS/RHEL, and their derivatives. + ENI --- @@ -213,6 +223,7 @@ preference) is as follows: - ENI - Sysconfig - Netplan +- NetworkManager - FreeBSD - NetBSD - OpenBSD @@ -223,6 +234,7 @@ preference) is as follows: - **ENI**: using ``ifup``, ``ifdown`` to manage device setup/teardown - **Netplan**: using ``netplan apply`` to manage device setup/teardown +- **NetworkManager**: using ``nmcli`` to manage device setup/teardown - **Networkd**: using ``ip`` to manage device setup/teardown When applying the policy, ``cloud-init`` checks if the current instance has the @@ -232,8 +244,8 @@ supplying an updated configuration in cloud-config. :: system_info: network: - renderers: ['netplan', 'eni', 'sysconfig', 'freebsd', 'netbsd', 'openbsd'] - activators: ['eni', 'netplan', 'networkd'] + renderers: ['netplan', 'network-manager', 'eni', 'sysconfig', 'freebsd', 'netbsd', 'openbsd'] + activators: ['eni', 'netplan', 'network-manager', 'networkd'] Network configuration tools =========================== -- 2.39.3