|
|
c60dcd |
From 6183f8a282703eaab967355a63fd5b116bb21f0b Mon Sep 17 00:00:00 2001
|
|
|
c60dcd |
From: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
c60dcd |
Date: Thu, 31 May 2018 19:37:55 +0200
|
|
|
c60dcd |
Subject: Do not write NM_CONTROLLED=no in generated interface config files
|
|
|
c60dcd |
|
|
|
c60dcd |
X-downstream-only: true
|
|
|
c60dcd |
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
|
|
|
c60dcd |
---
|
|
|
c60dcd |
cloudinit/net/sysconfig.py | 1 -
|
|
|
c60dcd |
tests/unittests/test_distros/test_netconfig.py | 4 ----
|
|
|
c60dcd |
tests/unittests/test_net.py | 30 --------------------------
|
|
|
c60dcd |
3 files changed, 35 deletions(-)
|
|
|
c60dcd |
|
|
|
c60dcd |
diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py
|
|
|
c60dcd |
index 39d89c4..cefb5c5 100644
|
|
|
c60dcd |
--- a/cloudinit/net/sysconfig.py
|
|
|
c60dcd |
+++ b/cloudinit/net/sysconfig.py
|
|
|
c60dcd |
@@ -233,7 +233,6 @@ class Renderer(renderer.Renderer):
|
|
|
c60dcd |
iface_defaults = tuple([
|
|
|
c60dcd |
('ONBOOT', True),
|
|
|
c60dcd |
('USERCTL', False),
|
|
|
c60dcd |
- ('NM_CONTROLLED', False),
|
|
|
c60dcd |
('BOOTPROTO', 'none'),
|
|
|
c60dcd |
])
|
|
|
c60dcd |
|
|
|
c60dcd |
diff --git a/tests/unittests/test_distros/test_netconfig.py b/tests/unittests/test_distros/test_netconfig.py
|
|
|
c60dcd |
index 1c2e45f..2f69455 100644
|
|
|
c60dcd |
--- a/tests/unittests/test_distros/test_netconfig.py
|
|
|
c60dcd |
+++ b/tests/unittests/test_distros/test_netconfig.py
|
|
|
c60dcd |
@@ -479,7 +479,6 @@ DEVICE=eth0
|
|
|
c60dcd |
GATEWAY=192.168.1.254
|
|
|
c60dcd |
IPADDR=192.168.1.5
|
|
|
c60dcd |
NETMASK=255.255.255.0
|
|
|
c60dcd |
-NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
c60dcd |
@@ -496,7 +495,6 @@ USERCTL=no
|
|
|
c60dcd |
#
|
|
|
c60dcd |
BOOTPROTO=dhcp
|
|
|
c60dcd |
DEVICE=eth1
|
|
|
c60dcd |
-NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
c60dcd |
@@ -630,7 +628,6 @@ DEVICE=eth0
|
|
|
c60dcd |
IPV6ADDR=2607:f0d0:1002:0011::2/64
|
|
|
c60dcd |
IPV6INIT=yes
|
|
|
c60dcd |
IPV6_DEFAULTGW=2607:f0d0:1002:0011::1
|
|
|
c60dcd |
-NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
c60dcd |
@@ -645,7 +642,6 @@ USERCTL=no
|
|
|
c60dcd |
#
|
|
|
c60dcd |
BOOTPROTO=dhcp
|
|
|
c60dcd |
DEVICE=eth1
|
|
|
c60dcd |
-NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
c60dcd |
diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py
|
|
|
c60dcd |
index c12a487..95318ed 100644
|
|
|
c60dcd |
--- a/tests/unittests/test_net.py
|
|
|
c60dcd |
+++ b/tests/unittests/test_net.py
|
|
|
c60dcd |
@@ -144,7 +144,6 @@ GATEWAY=172.19.3.254
|
|
|
c60dcd |
HWADDR=fa:16:3e:ed:9a:59
|
|
|
c60dcd |
IPADDR=172.19.1.34
|
|
|
c60dcd |
NETMASK=255.255.252.0
|
|
|
c60dcd |
-NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
c60dcd |
@@ -212,7 +211,6 @@ IPADDR=172.19.1.34
|
|
|
c60dcd |
IPADDR1=10.0.0.10
|
|
|
c60dcd |
NETMASK=255.255.252.0
|
|
|
c60dcd |
NETMASK1=255.255.255.0
|
|
|
c60dcd |
-NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
c60dcd |
@@ -302,7 +300,6 @@ IPV6ADDR_SECONDARIES="2001:DB9::10/64 2001:DB10::10/64"
|
|
|
c60dcd |
IPV6INIT=yes
|
|
|
c60dcd |
IPV6_DEFAULTGW=2001:DB8::1
|
|
|
c60dcd |
NETMASK=255.255.252.0
|
|
|
c60dcd |
-NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
c60dcd |
@@ -417,7 +414,6 @@ NETWORK_CONFIGS = {
|
|
|
c60dcd |
BOOTPROTO=none
|
|
|
c60dcd |
DEVICE=eth1
|
|
|
c60dcd |
HWADDR=cf:d6:af:48:e8:80
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no"""),
|
|
|
c60dcd |
@@ -432,7 +428,6 @@ NETWORK_CONFIGS = {
|
|
|
c60dcd |
HWADDR=c0:d6:9f:2c:e8:80
|
|
|
c60dcd |
IPADDR=192.168.21.3
|
|
|
c60dcd |
NETMASK=255.255.255.0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no"""),
|
|
|
c60dcd |
@@ -544,7 +539,6 @@ NETWORK_CONFIGS = {
|
|
|
c60dcd |
IPV6ADDR=2001:1::1/64
|
|
|
c60dcd |
IPV6INIT=yes
|
|
|
c60dcd |
NETMASK=255.255.255.0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
c60dcd |
@@ -745,14 +739,12 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
DHCPV6C=yes
|
|
|
c60dcd |
IPV6INIT=yes
|
|
|
c60dcd |
MACADDR=aa:bb:cc:dd:ee:ff
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Bond
|
|
|
c60dcd |
USERCTL=no"""),
|
|
|
c60dcd |
'ifcfg-bond0.200': textwrap.dedent("""\
|
|
|
c60dcd |
BOOTPROTO=dhcp
|
|
|
c60dcd |
DEVICE=bond0.200
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
PHYSDEV=bond0
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
@@ -768,7 +760,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
IPV6INIT=yes
|
|
|
c60dcd |
IPV6_DEFAULTGW=2001:4800:78ff:1b::1
|
|
|
c60dcd |
NETMASK=255.255.255.0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
PRIO=22
|
|
|
c60dcd |
STP=no
|
|
|
c60dcd |
@@ -778,7 +769,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
BOOTPROTO=none
|
|
|
c60dcd |
DEVICE=eth0
|
|
|
c60dcd |
HWADDR=c0:d6:9f:2c:e8:80
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no"""),
|
|
|
c60dcd |
@@ -795,7 +785,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
MTU=1500
|
|
|
c60dcd |
NETMASK=255.255.255.0
|
|
|
c60dcd |
NETMASK1=255.255.255.0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
PHYSDEV=eth0
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
@@ -806,7 +795,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
DEVICE=eth1
|
|
|
c60dcd |
HWADDR=aa:d6:9f:2c:e8:80
|
|
|
c60dcd |
MASTER=bond0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
SLAVE=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
@@ -816,7 +804,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
DEVICE=eth2
|
|
|
c60dcd |
HWADDR=c0:bb:9f:2c:e8:80
|
|
|
c60dcd |
MASTER=bond0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
SLAVE=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
@@ -826,7 +813,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
BRIDGE=br0
|
|
|
c60dcd |
DEVICE=eth3
|
|
|
c60dcd |
HWADDR=66:bb:9f:2c:e8:80
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no"""),
|
|
|
c60dcd |
@@ -835,7 +821,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
BRIDGE=br0
|
|
|
c60dcd |
DEVICE=eth4
|
|
|
c60dcd |
HWADDR=98:bb:9f:2c:e8:80
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no"""),
|
|
|
c60dcd |
@@ -843,7 +828,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
BOOTPROTO=dhcp
|
|
|
c60dcd |
DEVICE=eth5
|
|
|
c60dcd |
HWADDR=98:bb:9f:2c:e8:8a
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=no
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no""")
|
|
|
c60dcd |
@@ -1125,7 +1109,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
IPV6INIT=yes
|
|
|
c60dcd |
NETMASK=255.255.255.0
|
|
|
c60dcd |
NETMASK1=255.255.255.0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Bond
|
|
|
c60dcd |
USERCTL=no
|
|
|
c60dcd |
@@ -1135,7 +1118,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
DEVICE=bond0s0
|
|
|
c60dcd |
HWADDR=aa:bb:cc:dd:e8:00
|
|
|
c60dcd |
MASTER=bond0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
SLAVE=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
@@ -1153,7 +1135,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
DEVICE=bond0s1
|
|
|
c60dcd |
HWADDR=aa:bb:cc:dd:e8:01
|
|
|
c60dcd |
MASTER=bond0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
SLAVE=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
@@ -1190,7 +1171,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
BOOTPROTO=none
|
|
|
c60dcd |
DEVICE=en0
|
|
|
c60dcd |
HWADDR=aa:bb:cc:dd:e8:00
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no"""),
|
|
|
c60dcd |
@@ -1206,7 +1186,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
IPV6_DEFAULTGW=2001:1::1
|
|
|
c60dcd |
NETMASK=255.255.255.0
|
|
|
c60dcd |
NETMASK1=255.255.255.0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
PHYSDEV=en0
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
@@ -1247,7 +1226,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
DEVICE=br0
|
|
|
c60dcd |
IPADDR=192.168.2.2
|
|
|
c60dcd |
NETMASK=255.255.255.0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
PRIO=22
|
|
|
c60dcd |
STP=no
|
|
|
c60dcd |
@@ -1261,7 +1239,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
HWADDR=52:54:00:12:34:00
|
|
|
c60dcd |
IPV6ADDR=2001:1::100/96
|
|
|
c60dcd |
IPV6INIT=yes
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
c60dcd |
@@ -1273,7 +1250,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
HWADDR=52:54:00:12:34:01
|
|
|
c60dcd |
IPV6ADDR=2001:1::101/96
|
|
|
c60dcd |
IPV6INIT=yes
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
c60dcd |
@@ -1347,7 +1323,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
HWADDR=52:54:00:12:34:00
|
|
|
c60dcd |
IPADDR=192.168.1.2
|
|
|
c60dcd |
NETMASK=255.255.255.0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=no
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
c60dcd |
@@ -1357,7 +1332,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
DEVICE=eth1
|
|
|
c60dcd |
HWADDR=52:54:00:12:34:aa
|
|
|
c60dcd |
MTU=1480
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
c60dcd |
@@ -1366,7 +1340,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
BOOTPROTO=none
|
|
|
c60dcd |
DEVICE=eth2
|
|
|
c60dcd |
HWADDR=52:54:00:12:34:ff
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=no
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
c60dcd |
@@ -1639,7 +1612,6 @@ class TestSysConfigRendering(CiTestCase):
|
|
|
c60dcd |
BOOTPROTO=dhcp
|
|
|
c60dcd |
DEVICE=eth1000
|
|
|
c60dcd |
HWADDR=07-1C-C6-75-A4-BE
|
|
|
c60dcd |
-NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
c60dcd |
@@ -1759,7 +1731,6 @@ GATEWAY=10.0.2.2
|
|
|
c60dcd |
HWADDR=52:54:00:12:34:00
|
|
|
c60dcd |
IPADDR=10.0.2.15
|
|
|
c60dcd |
NETMASK=255.255.255.0
|
|
|
c60dcd |
-NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
c60dcd |
@@ -1780,7 +1751,6 @@ USERCTL=no
|
|
|
c60dcd |
#
|
|
|
c60dcd |
BOOTPROTO=dhcp
|
|
|
c60dcd |
DEVICE=eth0
|
|
|
c60dcd |
-NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
c60dcd |
--
|
|
|
c60dcd |
1.8.3.1
|
|
|
c60dcd |
|