forked from rpms/cloud-init
94 lines
3.2 KiB
Diff
94 lines
3.2 KiB
Diff
From 0b0632f6c084a8ce95b53cb5125dc0f4107e6968 Mon Sep 17 00:00:00 2001
|
|
From: Ani Sinha <anisinha@redhat.com>
|
|
Date: Thu, 4 May 2023 15:34:43 +0530
|
|
Subject: [PATCH] Revert "Manual revert "Use Network-Manager and Netplan as
|
|
default renderers for RHEL and Fedora (#1465)""
|
|
|
|
This reverts commit ecae81f98ce230266eb99671b74534a4ede660f0.
|
|
|
|
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 <anisinha@redhat.com>
|
|
---
|
|
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
|
|
===========================
|