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. Change-Id: Ie7f94f15b2d1c63d4eab61bc05e31e3bf1426953 Signed-off-by: Ondřej Svoboda <osvob...@redhat.com> --- M lib/vdsm/network/configurators/ifcfg.py M tests/functional/networkTests.py M tests/network/unified_persistence_test.py M vdsm_hooks/fakesriov/after_get_caps.py 4 files changed, 18 insertions(+), 18 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/43/56443/1 diff --git a/lib/vdsm/network/configurators/ifcfg.py b/lib/vdsm/network/configurators/ifcfg.py index 6c74472..30fb6aa 100644 --- a/lib/vdsm/network/configurators/ifcfg.py +++ b/lib/vdsm/network/configurators/ifcfg.py @@ -531,7 +531,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: @@ -648,7 +648,7 @@ cf = NET_CONF_PREF + nic self._backup(cf) l = [self.CONFFILE_HEADER + '\n', 'DEVICE=%s\n' % nic, 'ONBOOT=yes\n', - 'MTU=%s\n' % mtus.DEFAULT_MTU, 'NM_CONTROLLED=no\n'] + 'MTU=%s\n' % mtus.DEFAULT_MTU, 'NM_CONTROLLED=yes\n'] with open(cf, 'w') as nicFile: nicFile.writelines(l) diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py index fd8be29..55cb5cc 100644 --- a/tests/functional/networkTests.py +++ b/tests/functional/networkTests.py @@ -2654,28 +2654,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/network/unified_persistence_test.py b/tests/network/unified_persistence_test.py index 878e16d..f454e09 100644 --- a/tests/network/unified_persistence_test.py +++ b/tests/network/unified_persistence_test.py @@ -42,8 +42,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': { @@ -59,7 +59,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': []}}, @@ -71,7 +71,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', @@ -82,7 +82,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', @@ -104,14 +104,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' @@ -119,7 +119,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' @@ -127,7 +127,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_hooks/fakesriov/after_get_caps.py b/vdsm_hooks/fakesriov/after_get_caps.py index 7efd729..5d72224 100644 --- a/vdsm_hooks/fakesriov/after_get_caps.py +++ b/vdsm_hooks/fakesriov/after_get_caps.py @@ -33,7 +33,7 @@ 'addr': '', 'cfg': {'BOOTPROTO': 'none', 'BRIDGE': 'ovirtmgmt', 'DEVICE': _PF_DEVICE_NAME, 'HWADDR': '78:e7:d1:e4:8f:16', 'IPV6INIT': 'no', - 'MTU': '1500', 'NM_CONTROLLED': 'no', + 'MTU': '1500', 'NM_CONTROLLED': 'yes', 'ONBOOT': 'yes'}, 'dhcpv4': False, 'dhcpv6': False, 'gateway': '', 'hwaddr': '78:e7:d1:e4:8f:16', 'ipv4addrs': [], 'ipv6addrs': ['fe80::7ae7:d1ff:fee4:8f16/64'], 'ipv6gateway': '::', @@ -42,7 +42,7 @@ 'DEVICE': _VF0_DEVICE_NAME, 'HWADDR': 'be:b8:2b:a8:15:bf', 'MTU': '1500', - 'NM_CONTROLLED': 'no', + 'NM_CONTROLLED': 'yes', 'ONBOOT': 'yes'}, 'dhcpv4': False, 'dhcpv6': False, 'gateway': '', 'hwaddr': 'aa:8c:31:98:8a:9a', 'ipv4addrs': [], @@ -53,7 +53,7 @@ 'DEVICE': _VF1_DEVICE_NAME, 'HWADDR': '26:83:76:ec:08:6b', 'IPV6INIT': 'no', 'MTU': '1500', - 'NM_CONTROLLED': 'no', + 'NM_CONTROLLED': 'yes', 'ONBOOT': 'yes'}, 'dhcpv4': False, 'dhcpv6': False, 'gateway': '', 'hwaddr': 'ce:1f:0b:d1:ca:93', 'ipv4addrs': [], -- To view, visit https://gerrit.ovirt.org/56443 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie7f94f15b2d1c63d4eab61bc05e31e3bf1426953 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master 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