f368903e47
- Rebase to 24.1.4 [RHEL-33439] - Resolves: RHEL-33439 (Update cloud-init on 24.1.4 for RHEL 10)
269 lines
8.2 KiB
Diff
269 lines
8.2 KiB
Diff
From 8effa259c803f265553b8bfc629835d88815e2dd Mon Sep 17 00:00:00 2001
|
|
From: Brett Holman <brett.holman@canonical.com>
|
|
Date: Tue, 26 Mar 2024 15:02:39 -0500
|
|
Subject: [PATCH] fix(rhel): Fix network ordering in sysconfig
|
|
|
|
NM_CONTROLLED=true allows cloud-init to wait until network devices are online.
|
|
|
|
See upstream PR: https://github.com/canonical/cloud-init/pull/5089
|
|
|
|
Conflicts:
|
|
tests/unittests/net/network_configs.py
|
|
This file was added in commit a576d11ef93d ("Cleanup test_net.py (#4840)")
|
|
This commit is not part of 24.1.2 release.
|
|
|
|
(cherry picked from commit 9a7674af70026ba77612c8f53a82573bdc350ff7)
|
|
Signed-off-by: Ani Sinha <anisinha@redhat.com>
|
|
---
|
|
cloudinit/net/sysconfig.py | 1 -
|
|
doc/rtd/reference/network-config.rst | 2 --
|
|
tests/unittests/cmd/devel/test_net_convert.py | 1 -
|
|
tests/unittests/distros/test_netconfig.py | 8 --------
|
|
tests/unittests/test_net.py | 16 ----------------
|
|
5 files changed, 28 deletions(-)
|
|
|
|
diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py
|
|
index 622b8faf..3be35126 100644
|
|
--- a/cloudinit/net/sysconfig.py
|
|
+++ b/cloudinit/net/sysconfig.py
|
|
@@ -317,7 +317,6 @@ class Renderer(renderer.Renderer):
|
|
"rhel": {
|
|
"ONBOOT": True,
|
|
"USERCTL": False,
|
|
- "NM_CONTROLLED": False,
|
|
"BOOTPROTO": "none",
|
|
},
|
|
"suse": {"BOOTPROTO": "static", "STARTMODE": "auto"},
|
|
diff --git a/doc/rtd/reference/network-config.rst b/doc/rtd/reference/network-config.rst
|
|
index d9e67cf7..130b665e 100644
|
|
--- a/doc/rtd/reference/network-config.rst
|
|
+++ b/doc/rtd/reference/network-config.rst
|
|
@@ -308,7 +308,6 @@ Example output:
|
|
BOOTPROTO=static
|
|
DEVICE=eth7
|
|
IPADDR=192.168.1.5/255.255.255.0
|
|
- NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
@@ -316,7 +315,6 @@ Example output:
|
|
#
|
|
BOOTPROTO=dhcp
|
|
DEVICE=eth9
|
|
- NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
diff --git a/tests/unittests/cmd/devel/test_net_convert.py b/tests/unittests/cmd/devel/test_net_convert.py
|
|
index be2fcdd6..3e9a4f90 100644
|
|
--- a/tests/unittests/cmd/devel/test_net_convert.py
|
|
+++ b/tests/unittests/cmd/devel/test_net_convert.py
|
|
@@ -62,7 +62,6 @@ SAMPLE_SYSCONFIG_CONTENT = """\
|
|
#
|
|
BOOTPROTO=dhcp
|
|
DEVICE=eth0
|
|
-NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
diff --git a/tests/unittests/distros/test_netconfig.py b/tests/unittests/distros/test_netconfig.py
|
|
index d1e251b6..f35e5b0a 100644
|
|
--- a/tests/unittests/distros/test_netconfig.py
|
|
+++ b/tests/unittests/distros/test_netconfig.py
|
|
@@ -723,7 +723,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase):
|
|
GATEWAY=192.168.1.254
|
|
IPADDR=192.168.1.5
|
|
NETMASK=255.255.255.0
|
|
- NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
@@ -733,7 +732,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase):
|
|
"""\
|
|
BOOTPROTO=dhcp
|
|
DEVICE=eth1
|
|
- NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
@@ -764,7 +762,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase):
|
|
IPV6_AUTOCONF=no
|
|
IPV6_DEFAULTGW=2607:f0d0:1002:0011::1
|
|
IPV6_FORCE_ACCEPT_RA=no
|
|
- NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
@@ -774,7 +771,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase):
|
|
"""\
|
|
BOOTPROTO=dhcp
|
|
DEVICE=eth1
|
|
- NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
@@ -821,7 +817,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase):
|
|
HWADDR=00:16:3e:60:7c:df
|
|
IPADDR=192.10.1.2
|
|
NETMASK=255.255.255.0
|
|
- NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
@@ -833,7 +828,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase):
|
|
DEVICE=infra0
|
|
IPADDR=10.0.1.2
|
|
NETMASK=255.255.0.0
|
|
- NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
PHYSDEV=eth0
|
|
USERCTL=no
|
|
@@ -869,7 +863,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase):
|
|
DEVICE=eth0
|
|
IPADDR=192.10.1.2
|
|
NETMASK=255.255.255.0
|
|
- NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
@@ -881,7 +874,6 @@ class TestNetCfgDistroRedhat(TestNetCfgDistroBase):
|
|
DEVICE=eth0.1001
|
|
IPADDR=10.0.1.2
|
|
NETMASK=255.255.0.0
|
|
- NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
PHYSDEV=eth0
|
|
USERCTL=no
|
|
diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py
|
|
index cb991938..f898543c 100644
|
|
--- a/tests/unittests/test_net.py
|
|
+++ b/tests/unittests/test_net.py
|
|
@@ -585,7 +585,6 @@ GATEWAY=172.19.3.254
|
|
HWADDR=fa:16:3e:ed:9a:59
|
|
IPADDR=172.19.1.34
|
|
NETMASK=255.255.252.0
|
|
-NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
@@ -751,7 +750,6 @@ IPADDR=172.19.1.34
|
|
IPADDR1=10.0.0.10
|
|
NETMASK=255.255.252.0
|
|
NETMASK1=255.255.255.0
|
|
-NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
@@ -913,7 +911,6 @@ IPV6_AUTOCONF=no
|
|
IPV6_DEFAULTGW=2001:DB8::1
|
|
IPV6_FORCE_ACCEPT_RA=no
|
|
NETMASK=255.255.252.0
|
|
-NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
@@ -5232,7 +5229,6 @@ DEVICE=eth1000
|
|
DHCPV6C=yes
|
|
HWADDR=07-1c-c6-75-a4-be
|
|
IPV6INIT=yes
|
|
-NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
@@ -5444,7 +5440,6 @@ GATEWAY=10.0.2.2
|
|
HWADDR=52:54:00:12:34:00
|
|
IPADDR=10.0.2.15
|
|
NETMASK=255.255.255.0
|
|
-NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
@@ -5475,7 +5470,6 @@ HWADDR=fa:16:3e:25:b4:59
|
|
IPADDR=51.68.89.122
|
|
MTU=1500
|
|
NETMASK=255.255.240.0
|
|
-NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
@@ -5489,7 +5483,6 @@ DEVICE=eth1
|
|
DHCLIENT_SET_DEFAULT_ROUTE=no
|
|
HWADDR=fa:16:3e:b1:ca:29
|
|
MTU=9000
|
|
-NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
@@ -5514,7 +5507,6 @@ USERCTL=no
|
|
#
|
|
BOOTPROTO=dhcp
|
|
DEVICE=eth0
|
|
-NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
@@ -5761,7 +5753,6 @@ USERCTL=no
|
|
IPV6_FORCE_ACCEPT_RA=no
|
|
IPV6_DEFAULTGW=2001:db8::1
|
|
NETMASK=255.255.255.0
|
|
- NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
@@ -5793,7 +5784,6 @@ USERCTL=no
|
|
"""\
|
|
BOOTPROTO=none
|
|
DEVICE=eno1
|
|
- NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
@@ -5806,7 +5796,6 @@ USERCTL=no
|
|
IPADDR=192.6.1.9
|
|
MTU=1495
|
|
NETMASK=255.255.255.0
|
|
- NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
PHYSDEV=eno1
|
|
USERCTL=no
|
|
@@ -5842,7 +5831,6 @@ USERCTL=no
|
|
IPADDR=10.101.8.65
|
|
MTU=1334
|
|
NETMASK=255.255.255.192
|
|
- NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Bond
|
|
USERCTL=no
|
|
@@ -5854,7 +5842,6 @@ USERCTL=no
|
|
BOOTPROTO=none
|
|
DEVICE=enp0s0
|
|
MASTER=bond0
|
|
- NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
SLAVE=yes
|
|
TYPE=Bond
|
|
@@ -5867,7 +5854,6 @@ USERCTL=no
|
|
BOOTPROTO=none
|
|
DEVICE=enp0s1
|
|
MASTER=bond0
|
|
- NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
SLAVE=yes
|
|
TYPE=Bond
|
|
@@ -5898,7 +5884,6 @@ USERCTL=no
|
|
DEVICE=eno1
|
|
HWADDR=07-1c-c6-75-a4-be
|
|
METRIC=100
|
|
- NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|
|
@@ -5989,7 +5974,6 @@ USERCTL=no
|
|
IPV6_FORCE_ACCEPT_RA=no
|
|
MTU=1400
|
|
NETMASK=255.255.248.0
|
|
- NM_CONTROLLED=no
|
|
ONBOOT=yes
|
|
TYPE=Ethernet
|
|
USERCTL=no
|