Ondřej Svoboda has uploaded a new change for review.

Change subject: network: replace NM_CONTROLLED=no with 'yes'
......................................................................

network: replace NM_CONTROLLED=no with 'yes'

This is for testing only (on 3.6).

Change-Id: Ie7f94f15b2d1c63d4eab61bc05e31e3bf1426953
Signed-off-by: Ondřej Svoboda <osvob...@redhat.com>
---
M tests/functional/networkTests.py
M tests/netUnifiedPersistenceTests.py
M vdsm/network/configurators/ifcfg.py
3 files changed, 15 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/47/56447/1

diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py
index 5889de6..6fd285d 100644
--- a/tests/functional/networkTests.py
+++ b/tests/functional/networkTests.py
@@ -2688,28 +2688,28 @@
 SLAVE=yes
 ONBOOT=yes
 MTU=1500
-NM_CONTROLLED=no""" % (nics[0], BONDING_NAME))
+NM_CONTROLLED=yes""" % (nics[0], BONDING_NAME))
             with open(NET_CONF_PREF + nics[1], 'w') as f:
                 f.write("""DEVICE=%s
 MASTER=%s
 SLAVE=yes
 ONBOOT=yes
 MTU=1500
-NM_CONTROLLED=no""" % (nics[1], BONDING_NAME))
+NM_CONTROLLED=yes""" % (nics[1], BONDING_NAME))
             with open(NET_CONF_PREF + BONDING_NAME, 'w') as f:
                 f.write("""DEVICE=%s
 BONDING_OPTS='mode=802.3ad miimon=150'
 ONBOOT=yes
 BOOTPROTO=none
 DEFROUTE=yes
-NM_CONTROLLED=no
+NM_CONTROLLED=yes
 HOTPLUG=no""" % BONDING_NAME)
             with open(NET_CONF_PREF + BONDING_NAME + '.' + VLAN_ID, 'w') as f:
                 f.write("""DEVICE=%s.%s
 VLAN=yes
 ONBOOT=yes
 BOOTPROTO=static
-NM_CONTROLLED=no
+NM_CONTROLLED=yes
 HOTPLUG=no""" % (BONDING_NAME, VLAN_ID))
 
             rc, _, err = execCmd([EXT_IFUP, BONDING_NAME])
diff --git a/tests/netUnifiedPersistenceTests.py 
b/tests/netUnifiedPersistenceTests.py
index 2b421b2..169717e 100644
--- a/tests/netUnifiedPersistenceTests.py
+++ b/tests/netUnifiedPersistenceTests.py
@@ -37,8 +37,8 @@
     'nics': {
         NIC_NAME: {
             'permhwaddr': 'ba:8d:23:4d:d7:41', 'addr': '', 'cfg': {
-                'SLAVE': 'yes', 'MTU': '1500', 'NM_CONTROLLED': 'no', 'MASTER':
-                BOND_NAME, 'DEVICE': NIC_NAME, 'ONBOOT': 'yes'},
+                'SLAVE': 'yes', 'MTU': '1500', 'NM_CONTROLLED': 'yes',
+                'MASTER': BOND_NAME, 'DEVICE': NIC_NAME, 'ONBOOT': 'yes'},
             'ipv6addrs': [], 'mtu': '1500', 'netmask': '', 'ipv4addrs': [],
             'hwaddr': 'ba:8d:23:4d:d7:41', 'speed': 0},
         'eth0': {
@@ -54,7 +54,7 @@
         BOND_NAME + '.' + VLAN: {
             'iface': BOND_NAME, 'addr': '', 'cfg': {
                 'BRIDGE': NETWORK_NAME, 'VLAN': 'yes', 'HOTPLUG': 'no',
-                'NM_CONTROLLED': 'no', 'DEVICE': BOND_NAME + '.' + VLAN,
+                'NM_CONTROLLED': 'yes', 'DEVICE': BOND_NAME + '.' + VLAN,
                 'ONBOOT': 'yes'},
             'ipv6addrs': ['fe80::b88d:23ff:fe4d:d741/64'], 'vlanid': int(VLAN),
             'mtu': '1500', 'netmask': '', 'ipv4addrs': []}},
@@ -66,7 +66,7 @@
             {'arp_all_targets': '0'}},
         BOND_NAME: {
             'addr': '', 'cfg': {
-                'DEFROUTE': 'yes', 'HOTPLUG': 'no', 'NM_CONTROLLED': 'no',
+                'DEFROUTE': 'yes', 'HOTPLUG': 'no', 'NM_CONTROLLED': 'yes',
                 'BOOTPROTO': 'none', 'BONDING_OPTS': 'mode=802.3ad miimon=150',
                 'DEVICE': BOND_NAME, 'ONBOOT': 'yes'},
             'ipv6addrs': ['fe80::b88d:23ff:fe4d:d741/64'], 'mtu': '1500',
@@ -77,7 +77,7 @@
         NETWORK_NAME: {
             'iface': NETWORK_NAME, 'addr': '', 'cfg': {
                 'DEFROUTE': 'no', 'HOTPLUG': 'no', 'DELAY': '0',
-                'NM_CONTROLLED': 'no', 'BOOTPROTO': 'none', 'DEVICE':
+                'NM_CONTROLLED': 'yes', 'BOOTPROTO': 'none', 'DEVICE':
                 NETWORK_NAME, 'TYPE': 'Bridge', 'ONBOOT': 'yes'},
             'bridged': True, 'ipv6addrs': ['fe80::b88d:23ff:fe4d:d741/64'],
             'gateway': '', 'bootproto4': 'none', 'netmask': '', 'stp': 'off',
@@ -99,14 +99,14 @@
         'ONBOOT=no\n'
         'MTU=1500\n'
         'DEFROUTE=no\n'
-        'NM_CONTROLLED=no\n'
+        'NM_CONTROLLED=yes\n'
         'HOTPLUG=no' % NETWORK_NAME),
     BOND_NAME + '.' + VLAN: (
         'DEVICE=bond%s.%s\n'
         'VLAN=yes\n'
         'ONBOOT=yes\n'
         'BOOTPROTO=static\n'
-        'NM_CONTROLLED=no\n'
+        'NM_CONTROLLED=yes\n'
         'HOTPLUG=no' % (BOND_NAME, VLAN)),
     BOND_NAME: (
         'DEVICE=%s\n'
@@ -114,7 +114,7 @@
         'ONBOOT=yes\n'
         'BOOTPROTO=none\n'
         'DEFROUTE=yes\n'
-        'NM_CONTROLLED=no\n'
+        'NM_CONTROLLED=yes\n'
         'HOTPLUG=no' % BOND_NAME),
     NIC_NAME: (
         'DEVICE=%s\n'
@@ -122,7 +122,7 @@
         'SLAVE=yes\n'
         'ONBOOT=yes\n'
         'MTU=1500\n'
-        'NM_CONTROLLED=no' % (NIC_NAME, BOND_NAME))}
+        'NM_CONTROLLED=yes' % (NIC_NAME, BOND_NAME))}
 
 
 @contextmanager
diff --git a/vdsm/network/configurators/ifcfg.py 
b/vdsm/network/configurators/ifcfg.py
index 12b0b14..1dcf9e3 100644
--- a/vdsm/network/configurators/ifcfg.py
+++ b/vdsm/network/configurators/ifcfg.py
@@ -524,7 +524,7 @@
             cfg += 'MTU=%d\n' % mtu
         if ipv4.defaultRoute is not None:
             cfg += 'DEFROUTE=%s\n' % _to_ifcfg_bool(ipv4.defaultRoute)
-        cfg += 'NM_CONTROLLED=no\n'
+        cfg += 'NM_CONTROLLED=yes\n'
         enable_ipv6 = ipv6.address or ipv6.ipv6autoconf or ipv6.dhcpv6
         cfg += 'IPV6INIT=%s\n' % _to_ifcfg_bool(enable_ipv6)
         if enable_ipv6:
@@ -679,7 +679,7 @@
         hwlines = self._hwaddr_from_ifcfg_or_system(nic, cf)
         l = [self.CONFFILE_HEADER + '\n', 'DEVICE=%s\n' % nic, 'ONBOOT=yes\n',
              'MTU=%s\n' % netinfo.DEFAULT_MTU] + hwlines
-        l.append('NM_CONTROLLED=no\n')
+        l.append('NM_CONTROLLED=yes\n')
         with open(cf, 'w') as nicFile:
             nicFile.writelines(l)
 


-- 
To view, visit https://gerrit.ovirt.org/56447
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie7f94f15b2d1c63d4eab61bc05e31e3bf1426953
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Ondřej Svoboda <osvob...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to