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

272 lines
8.7 KiB
Diff
Raw Normal View History

2020-07-28 14:15:08 +00:00
From aa7ae9da7e10a5bcf190f8df3072e3864b2d8fb3 Mon Sep 17 00:00:00 2001
2019-07-30 03:40:16 +00:00
From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Thu, 31 May 2018 19:37:55 +0200
Subject: Do not write NM_CONTROLLED=no in generated interface config files
X-downstream-only: true
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
---
cloudinit/net/sysconfig.py | 1 -
tests/unittests/test_net.py | 30 ------------------------------
2 files changed, 31 deletions(-)
diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py
2020-07-28 14:15:08 +00:00
index 310cdf0..8bd7e88 100644
2019-07-30 03:40:16 +00:00
--- a/cloudinit/net/sysconfig.py
+++ b/cloudinit/net/sysconfig.py
2020-07-28 14:15:08 +00:00
@@ -272,7 +272,6 @@ class Renderer(renderer.Renderer):
2019-07-30 03:40:16 +00:00
iface_defaults = tuple([
('ONBOOT', True),
('USERCTL', False),
- ('NM_CONTROLLED', False),
('BOOTPROTO', 'none'),
2020-07-28 14:15:08 +00:00
('STARTMODE', 'auto'),
2019-07-30 03:40:16 +00:00
])
diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py
2020-07-28 14:15:08 +00:00
index 01119e0..a931a3e 100644
2019-07-30 03:40:16 +00:00
--- a/tests/unittests/test_net.py
+++ b/tests/unittests/test_net.py
2020-07-28 14:15:08 +00:00
@@ -530,7 +530,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
2019-07-30 03:40:16 +00:00
TYPE=Ethernet
2020-07-28 14:15:08 +00:00
@@ -636,7 +635,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
2019-07-30 03:40:16 +00:00
TYPE=Ethernet
2020-07-28 14:15:08 +00:00
@@ -772,7 +770,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
2019-07-30 03:40:16 +00:00
TYPE=Ethernet
2020-07-28 14:15:08 +00:00
@@ -889,7 +886,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
2019-07-30 03:40:16 +00:00
TYPE=Ethernet
2020-07-28 14:15:08 +00:00
@@ -907,7 +903,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
2019-07-30 03:40:16 +00:00
TYPE=Ethernet
2020-07-28 14:15:08 +00:00
@@ -1022,7 +1017,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
2019-07-30 03:40:16 +00:00
TYPE=Ethernet
2020-07-28 14:15:08 +00:00
@@ -1491,7 +1485,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
2019-07-30 03:40:16 +00:00
TYPE=Bond
2020-07-28 14:15:08 +00:00
@@ -1500,7 +1493,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
@@ -1519,7 +1511,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
@@ -1530,7 +1521,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
2019-07-30 03:40:16 +00:00
TYPE=Ethernet
2020-07-28 14:15:08 +00:00
@@ -1548,7 +1538,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
@@ -1560,7 +1549,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
2019-07-30 03:40:16 +00:00
SLAVE=yes
2020-07-28 14:15:08 +00:00
@@ -1571,7 +1559,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
2019-07-30 03:40:16 +00:00
SLAVE=yes
2020-07-28 14:15:08 +00:00
@@ -1582,7 +1569,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
2019-07-30 03:40:16 +00:00
TYPE=Ethernet
2020-07-28 14:15:08 +00:00
@@ -1592,7 +1578,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
2019-07-30 03:40:16 +00:00
TYPE=Ethernet
2020-07-28 14:15:08 +00:00
@@ -1602,7 +1587,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
2020-07-28 14:15:08 +00:00
STARTMODE=manual
2019-07-30 03:40:16 +00:00
TYPE=Ethernet
2020-07-28 14:15:08 +00:00
@@ -2088,7 +2072,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
2019-07-30 03:40:16 +00:00
TYPE=Bond
2020-07-28 14:15:08 +00:00
@@ -2099,7 +2082,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
@@ -2122,7 +2104,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
@@ -2161,7 +2142,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
2019-07-30 03:40:16 +00:00
TYPE=Ethernet
2020-07-28 14:15:08 +00:00
@@ -2180,7 +2160,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
@@ -2222,7 +2201,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
@@ -2238,7 +2216,6 @@ iface bond0 inet6 static
IPADDR6=2001:1::100/96
2019-07-30 03:40:16 +00:00
IPV6ADDR=2001:1::100/96
IPV6INIT=yes
- NM_CONTROLLED=no
ONBOOT=yes
2020-07-28 14:15:08 +00:00
STARTMODE=auto
2019-07-30 03:40:16 +00:00
TYPE=Ethernet
2020-07-28 14:15:08 +00:00
@@ -2252,7 +2229,6 @@ iface bond0 inet6 static
IPADDR6=2001:1::101/96
2019-07-30 03:40:16 +00:00
IPV6ADDR=2001:1::101/96
IPV6INIT=yes
- NM_CONTROLLED=no
ONBOOT=yes
2020-07-28 14:15:08 +00:00
STARTMODE=auto
2019-07-30 03:40:16 +00:00
TYPE=Ethernet
2020-07-28 14:15:08 +00:00
@@ -2327,7 +2303,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
2020-07-28 14:15:08 +00:00
STARTMODE=manual
2019-07-30 03:40:16 +00:00
TYPE=Ethernet
2020-07-28 14:15:08 +00:00
@@ -2338,7 +2313,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
2019-07-30 03:40:16 +00:00
TYPE=Ethernet
2020-07-28 14:15:08 +00:00
@@ -2348,7 +2322,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
2020-07-28 14:15:08 +00:00
STARTMODE=manual
2019-07-30 03:40:16 +00:00
TYPE=Ethernet
2020-07-28 14:15:08 +00:00
@@ -2766,7 +2739,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
2019-07-30 03:40:16 +00:00
TYPE=Ethernet
2020-07-28 14:15:08 +00:00
@@ -2888,7 +2860,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
2020-07-28 14:15:08 +00:00
STARTMODE=auto
2019-07-30 03:40:16 +00:00
TYPE=Ethernet
2020-07-28 14:15:08 +00:00
@@ -2961,7 +2932,6 @@ USERCTL=no
2019-07-30 03:40:16 +00:00
#
BOOTPROTO=dhcp
DEVICE=eth0
-NM_CONTROLLED=no
ONBOOT=yes
2020-07-28 14:15:08 +00:00
STARTMODE=auto
2019-07-30 03:40:16 +00:00
TYPE=Ethernet
--
2020-07-28 14:15:08 +00:00
1.8.3.1
2019-07-30 03:40:16 +00:00