cloud-init/SOURCES/0002-Do-not-write-NM_CONTROLLED-no-in-generated-interface.patch

279 lines
9.0 KiB
Diff
Raw Normal View History

2021-03-30 12:08:39 +00:00
From d9024cd3bd3bf09b05eb75ba3d81bd15f519c9f8 Mon Sep 17 00:00:00 2001
From: Eduardo Otubo <otubo@redhat.com>
Date: Mon, 5 Oct 2020 13:49:46 +0200
2019-07-30 03:40:16 +00:00
Subject: Do not write NM_CONTROLLED=no in generated interface config files
2021-03-30 12:08:39 +00:00
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.
2019-07-30 03:40:16 +00:00
X-downstream-only: true
2021-03-30 12:08:39 +00:00
Signed-off-by: Eduardo Otubo <otubo@redhat.com>
2019-07-30 03:40:16 +00:00
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
---
2021-03-30 12:08:39 +00:00
cloudinit/net/sysconfig.py | 2 +-
2019-07-30 03:40:16 +00:00
tests/unittests/test_net.py | 30 ------------------------------
2021-03-30 12:08:39 +00:00
2 files changed, 1 insertion(+), 31 deletions(-)
2019-07-30 03:40:16 +00:00
diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py
2021-03-30 12:08:39 +00:00
index 0a5d481..23e467d 100644
2019-07-30 03:40:16 +00:00
--- a/cloudinit/net/sysconfig.py
+++ b/cloudinit/net/sysconfig.py
2021-03-30 12:08:39 +00:00
@@ -277,7 +277,7 @@ class Renderer(renderer.Renderer):
# details about this)
iface_defaults = {
- 'rhel': {'ONBOOT': True, 'USERCTL': False, 'NM_CONTROLLED': False,
+ 'rhel': {'ONBOOT': True, 'USERCTL': False,
'BOOTPROTO': 'none'},
'suse': {'BOOTPROTO': 'static', 'STARTMODE': 'auto'},
}
2019-07-30 03:40:16 +00:00
diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py
2021-03-30 12:08:39 +00:00
index 54cc846..9985a97 100644
2019-07-30 03:40:16 +00:00
--- a/tests/unittests/test_net.py
+++ b/tests/unittests/test_net.py
2021-03-30 12:08:39 +00:00
@@ -535,7 +535,6 @@ GATEWAY=172.19.3.254
2019-07-30 03:40:16 +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
2021-03-30 12:08:39 +00:00
USERCTL=no
@@ -633,7 +632,6 @@ IPADDR=172.19.1.34
2019-07-30 03:40:16 +00:00
IPADDR1=10.0.0.10
NETMASK=255.255.252.0
NETMASK1=255.255.255.0
-NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
2021-03-30 12:08:39 +00:00
USERCTL=no
@@ -754,7 +752,6 @@ IPV6ADDR_SECONDARIES="2001:DB9::10/64 2001:DB10::10/64"
2019-07-30 03:40:16 +00:00
IPV6INIT=yes
IPV6_DEFAULTGW=2001:DB8::1
NETMASK=255.255.252.0
-NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
2021-03-30 12:08:39 +00:00
USERCTL=no
@@ -882,7 +879,6 @@ NETWORK_CONFIGS = {
2019-07-30 03:40:16 +00:00
BOOTPROTO=none
DEVICE=eth1
HWADDR=cf:d6:af:48:e8:80
- NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
2021-03-30 12:08:39 +00:00
USERCTL=no"""),
@@ -899,7 +895,6 @@ NETWORK_CONFIGS = {
2019-07-30 03:40:16 +00:00
IPADDR=192.168.21.3
NETMASK=255.255.255.0
METRIC=10000
- NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
2021-03-30 12:08:39 +00:00
USERCTL=no"""),
@@ -1028,7 +1023,6 @@ NETWORK_CONFIGS = {
2019-07-30 03:40:16 +00:00
IPV6ADDR=2001:1::1/64
IPV6INIT=yes
NETMASK=255.255.255.0
- NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
2021-03-30 12:08:39 +00:00
USERCTL=no
@@ -1622,7 +1616,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
2019-07-30 03:40:16 +00:00
DHCPV6C=yes
IPV6INIT=yes
MACADDR=aa:bb:cc:dd:ee:ff
- NM_CONTROLLED=no
ONBOOT=yes
TYPE=Bond
2021-03-30 12:08:39 +00:00
USERCTL=no"""),
@@ -1630,7 +1623,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
2019-07-30 03:40:16 +00:00
BOOTPROTO=dhcp
DEVICE=bond0.200
2020-07-28 14:15:08 +00:00
DHCLIENT_SET_DEFAULT_ROUTE=no
2019-07-30 03:40:16 +00:00
- NM_CONTROLLED=no
ONBOOT=yes
PHYSDEV=bond0
2021-03-30 12:08:39 +00:00
TYPE=Ethernet
@@ -1647,7 +1639,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
2019-07-30 03:40:16 +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
2021-03-30 12:08:39 +00:00
STP=no
@@ -1657,7 +1648,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
2019-07-30 03:40:16 +00:00
BOOTPROTO=none
DEVICE=eth0
HWADDR=c0:d6:9f:2c:e8:80
- NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
2021-03-30 12:08:39 +00:00
USERCTL=no"""),
@@ -1674,7 +1664,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
2019-07-30 03:40:16 +00:00
MTU=1500
NETMASK=255.255.255.0
NETMASK1=255.255.255.0
- NM_CONTROLLED=no
ONBOOT=yes
PHYSDEV=eth0
2021-03-30 12:08:39 +00:00
TYPE=Ethernet
@@ -1685,7 +1674,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
2019-07-30 03:40:16 +00:00
DEVICE=eth1
HWADDR=aa:d6:9f:2c:e8:80
MASTER=bond0
- NM_CONTROLLED=no
ONBOOT=yes
SLAVE=yes
2021-03-30 12:08:39 +00:00
TYPE=Ethernet
@@ -1695,7 +1683,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
2019-07-30 03:40:16 +00:00
DEVICE=eth2
HWADDR=c0:bb:9f:2c:e8:80
MASTER=bond0
- NM_CONTROLLED=no
ONBOOT=yes
SLAVE=yes
2021-03-30 12:08:39 +00:00
TYPE=Ethernet
@@ -1705,7 +1692,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
2019-07-30 03:40:16 +00:00
BRIDGE=br0
DEVICE=eth3
HWADDR=66:bb:9f:2c:e8:80
- NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
2021-03-30 12:08:39 +00:00
USERCTL=no"""),
@@ -1714,7 +1700,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
2019-07-30 03:40:16 +00:00
BRIDGE=br0
DEVICE=eth4
HWADDR=98:bb:9f:2c:e8:80
- NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
2021-03-30 12:08:39 +00:00
USERCTL=no"""),
@@ -1723,7 +1708,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
2019-07-30 03:40:16 +00:00
DEVICE=eth5
2020-07-28 14:15:08 +00:00
DHCLIENT_SET_DEFAULT_ROUTE=no
2019-07-30 03:40:16 +00:00
HWADDR=98:bb:9f:2c:e8:8a
- NM_CONTROLLED=no
ONBOOT=no
TYPE=Ethernet
2021-03-30 12:08:39 +00:00
USERCTL=no"""),
@@ -2177,7 +2161,6 @@ iface bond0 inet6 static
2019-07-30 03:40:16 +00:00
MTU=9000
NETMASK=255.255.255.0
NETMASK1=255.255.255.0
- NM_CONTROLLED=no
ONBOOT=yes
TYPE=Bond
2021-03-30 12:08:39 +00:00
USERCTL=no
@@ -2187,7 +2170,6 @@ iface bond0 inet6 static
2019-07-30 03:40:16 +00:00
DEVICE=bond0s0
HWADDR=aa:bb:cc:dd:e8:00
MASTER=bond0
- NM_CONTROLLED=no
ONBOOT=yes
SLAVE=yes
2021-03-30 12:08:39 +00:00
TYPE=Ethernet
@@ -2209,7 +2191,6 @@ iface bond0 inet6 static
2019-07-30 03:40:16 +00:00
DEVICE=bond0s1
HWADDR=aa:bb:cc:dd:e8:01
MASTER=bond0
- NM_CONTROLLED=no
ONBOOT=yes
SLAVE=yes
2021-03-30 12:08:39 +00:00
TYPE=Ethernet
@@ -2266,7 +2247,6 @@ iface bond0 inet6 static
2019-07-30 03:40:16 +00:00
BOOTPROTO=none
DEVICE=en0
HWADDR=aa:bb:cc:dd:e8:00
- NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
2021-03-30 12:08:39 +00:00
USERCTL=no"""),
@@ -2283,7 +2263,6 @@ iface bond0 inet6 static
2019-07-30 03:40:16 +00:00
MTU=2222
NETMASK=255.255.255.0
NETMASK1=255.255.255.0
- NM_CONTROLLED=no
ONBOOT=yes
PHYSDEV=en0
2021-03-30 12:08:39 +00:00
TYPE=Ethernet
@@ -2349,7 +2328,6 @@ iface bond0 inet6 static
2019-07-30 03:40:16 +00:00
DEVICE=br0
IPADDR=192.168.2.2
NETMASK=255.255.255.0
- NM_CONTROLLED=no
ONBOOT=yes
PRIO=22
2021-03-30 12:08:39 +00:00
STP=no
@@ -2363,7 +2341,6 @@ iface bond0 inet6 static
HWADDR=52:54:00:12:34:00
2019-07-30 03:40:16 +00:00
IPV6ADDR=2001:1::100/96
IPV6INIT=yes
- NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
2021-03-30 12:08:39 +00:00
USERCTL=no
@@ -2375,7 +2352,6 @@ iface bond0 inet6 static
HWADDR=52:54:00:12:34:01
2019-07-30 03:40:16 +00:00
IPV6ADDR=2001:1::101/96
IPV6INIT=yes
- NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
2021-03-30 12:08:39 +00:00
USERCTL=no
@@ -2469,7 +2445,6 @@ iface bond0 inet6 static
2019-07-30 03:40:16 +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
2021-03-30 12:08:39 +00:00
USERCTL=no
@@ -2479,7 +2454,6 @@ iface bond0 inet6 static
2019-07-30 03:40:16 +00:00
DEVICE=eth1
HWADDR=52:54:00:12:34:aa
MTU=1480
- NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
2021-03-30 12:08:39 +00:00
USERCTL=no
@@ -2488,7 +2462,6 @@ iface bond0 inet6 static
2019-07-30 03:40:16 +00:00
BOOTPROTO=none
DEVICE=eth2
HWADDR=52:54:00:12:34:ff
- NM_CONTROLLED=no
ONBOOT=no
TYPE=Ethernet
2021-03-30 12:08:39 +00:00
USERCTL=no
@@ -2905,7 +2878,6 @@ class TestRhelSysConfigRendering(CiTestCase):
2019-07-30 03:40:16 +00:00
BOOTPROTO=dhcp
DEVICE=eth1000
2020-07-28 14:15:08 +00:00
HWADDR=07-1c-c6-75-a4-be
2019-07-30 03:40:16 +00:00
-NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
2021-03-30 12:08:39 +00:00
USERCTL=no
@@ -3026,7 +2998,6 @@ GATEWAY=10.0.2.2
2019-07-30 03:40:16 +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
2021-03-30 12:08:39 +00:00
USERCTL=no
@@ -3096,7 +3067,6 @@ USERCTL=no
2019-07-30 03:40:16 +00:00
#
BOOTPROTO=dhcp
DEVICE=eth0
-NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
2021-03-30 12:08:39 +00:00
USERCTL=no
2019-07-30 03:40:16 +00:00
--
2020-07-28 14:15:08 +00:00
1.8.3.1
2019-07-30 03:40:16 +00:00