2023-04-21 22:20:16 +00:00
|
|
|
From 04847980754f9d5c4f5363f4bb637d1e95470fa9 Mon Sep 17 00:00:00 2001
|
2022-05-26 05:09:09 +00:00
|
|
|
From: Eduardo Otubo <otubo@redhat.com>
|
|
|
|
Date: Fri, 7 May 2021 13:36:06 +0200
|
|
|
|
Subject: Do not write NM_CONTROLLED=no in generated interface config files
|
|
|
|
|
|
|
|
Conflicts 20.3:
|
|
|
|
- Not appplying patch on cloudinit/net/sysconfig.py since it now has a
|
|
|
|
mechanism to identify if cloud-init is running on RHEL, having the
|
|
|
|
correct settings for NM_CONTROLLED.
|
|
|
|
|
|
|
|
X-downstream-only: true
|
|
|
|
Signed-off-by: Eduardo Otubo <otubo@redhat.com>
|
|
|
|
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
|
2023-04-21 22:20:16 +00:00
|
|
|
(cherry picked from commit e0dc628ac553072891fa6607dc91b652efd99be2)
|
|
|
|
Signed-off-by: Ani Sinha <anisinha@redhat.com>
|
2022-05-26 05:09:09 +00:00
|
|
|
---
|
2022-05-31 18:24:07 +00:00
|
|
|
cloudinit/net/sysconfig.py | 1 -
|
2022-05-26 05:09:09 +00:00
|
|
|
tests/unittests/test_net.py | 28 ----------------------------
|
2022-05-31 18:24:07 +00:00
|
|
|
2 files changed, 29 deletions(-)
|
2022-05-26 05:09:09 +00:00
|
|
|
|
|
|
|
diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py
|
2023-04-21 22:20:16 +00:00
|
|
|
index d4daa78f..1d3d83dc 100644
|
2022-05-26 05:09:09 +00:00
|
|
|
--- a/cloudinit/net/sysconfig.py
|
|
|
|
+++ b/cloudinit/net/sysconfig.py
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -316,7 +316,6 @@ class Renderer(renderer.Renderer):
|
2022-05-31 18:24:07 +00:00
|
|
|
"rhel": {
|
|
|
|
"ONBOOT": True,
|
|
|
|
"USERCTL": False,
|
|
|
|
- "NM_CONTROLLED": False,
|
|
|
|
"BOOTPROTO": "none",
|
|
|
|
},
|
|
|
|
"suse": {"BOOTPROTO": "static", "STARTMODE": "auto"},
|
2022-05-26 05:09:09 +00:00
|
|
|
diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py
|
2023-04-21 22:20:16 +00:00
|
|
|
index 056aaeb6..0f523ff8 100644
|
2022-05-26 05:09:09 +00:00
|
|
|
--- a/tests/unittests/test_net.py
|
|
|
|
+++ b/tests/unittests/test_net.py
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -585,7 +585,6 @@ GATEWAY=172.19.3.254
|
2022-05-26 05:09:09 +00:00
|
|
|
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
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -749,7 +748,6 @@ IPADDR=172.19.1.34
|
2022-05-26 05:09:09 +00:00
|
|
|
IPADDR1=10.0.0.10
|
|
|
|
NETMASK=255.255.252.0
|
|
|
|
NETMASK1=255.255.255.0
|
|
|
|
-NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
TYPE=Ethernet
|
|
|
|
USERCTL=no
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -911,7 +909,6 @@ IPV6_AUTOCONF=no
|
2022-05-26 05:09:09 +00:00
|
|
|
IPV6_DEFAULTGW=2001:DB8::1
|
|
|
|
IPV6_FORCE_ACCEPT_RA=no
|
|
|
|
NETMASK=255.255.252.0
|
|
|
|
-NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
TYPE=Ethernet
|
|
|
|
USERCTL=no
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -1090,7 +1087,6 @@ NETWORK_CONFIGS = {
|
2022-05-26 05:09:09 +00:00
|
|
|
BOOTPROTO=none
|
|
|
|
DEVICE=eth1
|
|
|
|
HWADDR=cf:d6:af:48:e8:80
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
TYPE=Ethernet
|
2022-05-31 18:24:07 +00:00
|
|
|
USERCTL=no"""
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -1109,7 +1105,6 @@ NETWORK_CONFIGS = {
|
2022-05-26 05:09:09 +00:00
|
|
|
IPADDR=192.168.21.3
|
|
|
|
NETMASK=255.255.255.0
|
|
|
|
METRIC=10000
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
TYPE=Ethernet
|
2022-05-31 18:24:07 +00:00
|
|
|
USERCTL=no"""
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -1353,7 +1348,6 @@ NETWORK_CONFIGS = {
|
2022-05-26 05:09:09 +00:00
|
|
|
IPV6_AUTOCONF=no
|
|
|
|
IPV6_FORCE_ACCEPT_RA=no
|
|
|
|
NETMASK=255.255.255.0
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
TYPE=Ethernet
|
|
|
|
USERCTL=no
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -2377,7 +2371,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
|
2022-05-26 05:09:09 +00:00
|
|
|
DHCPV6C=yes
|
|
|
|
IPV6INIT=yes
|
|
|
|
MACADDR=aa:bb:cc:dd:ee:ff
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
TYPE=Bond
|
2022-05-31 18:24:07 +00:00
|
|
|
USERCTL=no"""
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -2387,7 +2380,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
|
2022-05-26 05:09:09 +00:00
|
|
|
BOOTPROTO=dhcp
|
|
|
|
DEVICE=bond0.200
|
|
|
|
DHCLIENT_SET_DEFAULT_ROUTE=no
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
PHYSDEV=bond0
|
|
|
|
USERCTL=no
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -2407,7 +2399,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
|
2022-05-26 05:09:09 +00:00
|
|
|
IPV6_DEFAULTGW=2001:4800:78ff:1b::1
|
|
|
|
MACADDR=bb:bb:bb:bb:bb:aa
|
|
|
|
NETMASK=255.255.255.0
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
PRIO=22
|
|
|
|
STP=no
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -2419,7 +2410,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
|
2022-05-26 05:09:09 +00:00
|
|
|
BOOTPROTO=none
|
|
|
|
DEVICE=eth0
|
|
|
|
HWADDR=c0:d6:9f:2c:e8:80
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
TYPE=Ethernet
|
2022-05-31 18:24:07 +00:00
|
|
|
USERCTL=no"""
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -2438,7 +2428,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
|
2022-05-26 05:09:09 +00:00
|
|
|
MTU=1500
|
|
|
|
NETMASK=255.255.255.0
|
|
|
|
NETMASK1=255.255.255.0
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
PHYSDEV=eth0
|
|
|
|
USERCTL=no
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -2450,7 +2439,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
|
2022-05-26 05:09:09 +00:00
|
|
|
DEVICE=eth1
|
|
|
|
HWADDR=aa:d6:9f:2c:e8:80
|
|
|
|
MASTER=bond0
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
SLAVE=yes
|
|
|
|
TYPE=Ethernet
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -2462,7 +2450,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
|
2022-05-26 05:09:09 +00:00
|
|
|
DEVICE=eth2
|
|
|
|
HWADDR=c0:bb:9f:2c:e8:80
|
|
|
|
MASTER=bond0
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
SLAVE=yes
|
|
|
|
TYPE=Ethernet
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -2474,7 +2461,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
|
2022-05-26 05:09:09 +00:00
|
|
|
BRIDGE=br0
|
|
|
|
DEVICE=eth3
|
|
|
|
HWADDR=66:bb:9f:2c:e8:80
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
TYPE=Ethernet
|
2022-05-31 18:24:07 +00:00
|
|
|
USERCTL=no"""
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -2485,7 +2471,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
|
2022-05-26 05:09:09 +00:00
|
|
|
BRIDGE=br0
|
|
|
|
DEVICE=eth4
|
|
|
|
HWADDR=98:bb:9f:2c:e8:80
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
TYPE=Ethernet
|
2022-05-31 18:24:07 +00:00
|
|
|
USERCTL=no"""
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -2496,7 +2481,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
|
2022-05-26 05:09:09 +00:00
|
|
|
DEVICE=eth5
|
|
|
|
DHCLIENT_SET_DEFAULT_ROUTE=no
|
|
|
|
HWADDR=98:bb:9f:2c:e8:8a
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=no
|
|
|
|
TYPE=Ethernet
|
2022-05-31 18:24:07 +00:00
|
|
|
USERCTL=no"""
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -3220,7 +3204,6 @@ iface bond0 inet6 static
|
2022-05-26 05:09:09 +00:00
|
|
|
MTU=9000
|
|
|
|
NETMASK=255.255.255.0
|
|
|
|
NETMASK1=255.255.255.0
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
TYPE=Bond
|
|
|
|
USERCTL=no
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -3232,7 +3215,6 @@ iface bond0 inet6 static
|
2022-05-26 05:09:09 +00:00
|
|
|
DEVICE=bond0s0
|
|
|
|
HWADDR=aa:bb:cc:dd:e8:00
|
|
|
|
MASTER=bond0
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
SLAVE=yes
|
|
|
|
TYPE=Ethernet
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -3260,7 +3242,6 @@ iface bond0 inet6 static
|
2022-05-26 05:09:09 +00:00
|
|
|
DEVICE=bond0s1
|
|
|
|
HWADDR=aa:bb:cc:dd:e8:01
|
|
|
|
MASTER=bond0
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
SLAVE=yes
|
|
|
|
TYPE=Ethernet
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -3406,7 +3387,6 @@ iface bond0 inet6 static
|
2022-05-26 05:09:09 +00:00
|
|
|
BOOTPROTO=none
|
|
|
|
DEVICE=en0
|
|
|
|
HWADDR=aa:bb:cc:dd:e8:00
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
TYPE=Ethernet
|
2022-05-31 18:24:07 +00:00
|
|
|
USERCTL=no"""
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -3427,7 +3407,6 @@ iface bond0 inet6 static
|
2022-05-26 05:09:09 +00:00
|
|
|
MTU=2222
|
|
|
|
NETMASK=255.255.255.0
|
|
|
|
NETMASK1=255.255.255.0
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
PHYSDEV=en0
|
|
|
|
USERCTL=no
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -3553,7 +3532,6 @@ iface bond0 inet6 static
|
2022-05-26 05:09:09 +00:00
|
|
|
DEVICE=br0
|
|
|
|
IPADDR=192.168.2.2
|
|
|
|
NETMASK=255.255.255.0
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
PRIO=22
|
|
|
|
STP=no
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -3769,7 +3747,6 @@ iface bond0 inet6 static
|
2022-05-26 05:09:09 +00:00
|
|
|
HWADDR=52:54:00:12:34:00
|
|
|
|
IPADDR=192.168.1.2
|
|
|
|
NETMASK=255.255.255.0
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=no
|
|
|
|
TYPE=Ethernet
|
|
|
|
USERCTL=no
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -3781,7 +3758,6 @@ iface bond0 inet6 static
|
2022-05-26 05:09:09 +00:00
|
|
|
DEVICE=eth1
|
|
|
|
HWADDR=52:54:00:12:34:aa
|
|
|
|
MTU=1480
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
TYPE=Ethernet
|
|
|
|
USERCTL=no
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -3792,7 +3768,6 @@ iface bond0 inet6 static
|
2022-05-26 05:09:09 +00:00
|
|
|
BOOTPROTO=none
|
|
|
|
DEVICE=eth2
|
|
|
|
HWADDR=52:54:00:12:34:ff
|
|
|
|
- NM_CONTROLLED=no
|
|
|
|
ONBOOT=no
|
|
|
|
TYPE=Ethernet
|
|
|
|
USERCTL=no
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -4469,7 +4444,6 @@ class TestRhelSysConfigRendering(CiTestCase):
|
2022-05-26 05:09:09 +00:00
|
|
|
BOOTPROTO=dhcp
|
|
|
|
DEVICE=eth1000
|
|
|
|
HWADDR=07-1c-c6-75-a4-be
|
|
|
|
-NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
TYPE=Ethernet
|
|
|
|
USERCTL=no
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -4681,7 +4655,6 @@ GATEWAY=10.0.2.2
|
2022-05-26 05:09:09 +00:00
|
|
|
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
|
2023-04-21 22:20:16 +00:00
|
|
|
@@ -4751,7 +4724,6 @@ USERCTL=no
|
2022-05-26 05:09:09 +00:00
|
|
|
#
|
|
|
|
BOOTPROTO=dhcp
|
|
|
|
DEVICE=eth0
|
|
|
|
-NM_CONTROLLED=no
|
|
|
|
ONBOOT=yes
|
|
|
|
TYPE=Ethernet
|
|
|
|
USERCTL=no
|
|
|
|
--
|
2023-04-21 22:20:16 +00:00
|
|
|
2.37.3
|
2022-05-26 05:09:09 +00:00
|
|
|
|