Ondřej Svoboda has posted comments on this change.
Change subject: iproute2: source routes are removed by the kernel on ifdown
......................................................................
Patch Set 4: Verified+1
There is a test, actually.
testSetupNetworksAddDelDhcp checks that both routes and routing rules are gone when the
test-network is removed.
You can the discussed testing code in the recent readability improvement:
https://gerrit.ovirt.org/#/c/41236/
As for verification, I ran all (including slow) functional tests and there were only 4
recurring failures:
======================================================================
FAIL: testSetupNetworksAddBondWithManyVlans(kwargs=False)
(functional.networkTests.NetworkTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/share/vdsm/tests/testlib.py", line 64, in wrapper
return f(self, *args)
File "/usr/share/vdsm/tests/functional/networkTests.py", line 194, in wrapper
func(*args, **kwargs)
File "/usr/share/vdsm/tests/functional/networkTests.py", line 423, in
testSetupNetworksAddBondWithManyVlans
self.retryAssert(assertDevStatsReported, timeout=20)
File "/usr/share/vdsm/tests/testlib.py", line 162, in retryAssert
return retry(expectedException=AssertionError, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 1008, in retry
return func()
File "/usr/share/vdsm/tests/functional/networkTests.py", line 402, in
assertDevStatsReported
BONDING_NAME + '.' + str(tag), hostStats['network'])
AssertionError: 'bond11.0' not found in {'bond0': {'sampleTime':
1432889660.452088, 'rxDropped': '0', 'tx': '0',
'rxErrors': '0', 'rx': '0', 'txDropped':
'0', 'txRate': '0.0', 'rxRate': '0.0',
'txErrors': '0', 'state': 'down', 'speed':
'1000', 'name': 'bond0'}, 'lo': {'sampleTime':
1432889660.452088, 'rxDropped': '0', 'tx': '4385570',
'rxErrors': '0', 'rx': '4385570', 'txDropped':
'0', 'txRate': '0.0', 'rxRate': '0.0',
'txErrors': '0', 'state': 'up', 'speed':
'1000', 'name': 'lo'}, 'dummy_3OnBX':
{'sampleTime': 1432889660.452088, 'rxDropped': '0', 'tx':
'0', 'rxErrors': '0', 'rx': '0',
'txDropped': '0', 'txRate': '0.0', 'rxRate':
'0.0', 'txErrors': '0', 'state': 'down',
'speed': '1000', 'name': 'dummy_3OnBX'},
'dummy_ZWNeo': {'sampleTime': 1432889660.452088, 'rxDropped':
'0', 'tx': '0', 'rxErrors': '0', 'rx':
'0', 'txDropped': '0', 'txRate': '0.0',
'rxRate': '0.0', 'txErrors': '0', 'state':
'down', 'speed': '1000', 'name': 'dummy_ZWNeo'},
';vdsmdummy;': {'sampleTime': 143288!
9660.452088, 'rxDropped': '0', 'tx': '0',
'rxErrors': '0', 'rx': '0', 'txDropped':
'0', 'txRate': '0.0', 'rxRate': '0.0',
'txErrors': '0', 'state': 'down', 'speed':
'1000', 'name': ';vdsmdummy;'}, 'dummy_Sa1vh':
{'sampleTime': 1432889660.452088, 'rxDropped': '0', 'tx':
'0', 'rxErrors': '0', 'rx': '0',
'txDropped': '0', 'txRate': '0.0', 'rxRate':
'0.0', 'txErrors': '0', 'state': 'down',
'speed': '1000', 'name': 'dummy_Sa1vh'}, 'bond11':
{'sampleTime': 1432889660.452088, 'rxDropped': '0', 'tx':
'55978', 'rxErrors': '0', 'rx': '0',
'txDropped': '0', 'txRate': '0.0', 'rxRate':
'0.0', 'txErrors': '0', 'state': 'up',
'speed': '1000', 'name': 'bond11'}, 'dummy_5Eslg':
{'sampleTime': 1432889660.452088, 'rxDropped': '0', 'tx':
'48890', 'rxErrors': '0', 'rx': '0',
'txDropped': '0', 'txRate': '0.0', 'rxRate':
'0.0', 'txErrors': '0', 'state': 'up',
'speed': '1000', 'name': 'dummy_5Eslg'}, 'dummy0':
{'sampleTime': 1432889660.452088, 'rxDropped': '0', 'tx':
'0', 'rxErrors': '0', 'rx': '0!
', 'txDropped': '0', 'txRate': '0.0',
'rxRate': '0.0', 'txErrors': '0', 'state':
'down', 'speed': '1000', 'name': 'dummy0'},
'dummy_YGKbY': {'sampleTime': 1432889660.452088, 'rxDropped':
'0', 'tx': '7088', 'rxErrors': '0', 'rx':
'0', 'txDropped': '0', 'txRate': '0.0',
'rxRate': '0.0', 'txErrors': '0', 'state':
'up', 'speed': '1000', 'name': 'dummy_YGKbY'},
'eth0': {'sampleTime': 1432889660.452088, 'rxDropped':
'0', 'tx': '1383818', 'rxErrors': '0',
'rx': '29607244', 'txDropped': '0', 'txRate':
'0.0', 'rxRate': '0.0', 'txErrors': '0',
'state': 'up', 'speed': '1000', 'name':
'eth0'}}
======================================================================
FAIL: testSetupNetworksAddBondWithManyVlans(kwargs=True)
(functional.networkTests.NetworkTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/share/vdsm/tests/testlib.py", line 64, in wrapper
return f(self, *args)
File "/usr/share/vdsm/tests/functional/networkTests.py", line 194, in wrapper
func(*args, **kwargs)
File "/usr/share/vdsm/tests/functional/networkTests.py", line 423, in
testSetupNetworksAddBondWithManyVlans
self.retryAssert(assertDevStatsReported, timeout=20)
File "/usr/share/vdsm/tests/testlib.py", line 162, in retryAssert
return retry(expectedException=AssertionError, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 1008, in retry
return func()
File "/usr/share/vdsm/tests/functional/networkTests.py", line 402, in
assertDevStatsReported
BONDING_NAME + '.' + str(tag), hostStats['network'])
AssertionError: 'bond11.0' not found in {'bond0': {'sampleTime':
1432889690.469124, 'rxDropped': '0', 'tx': '0',
'rxErrors': '0', 'rx': '0', 'txDropped':
'0', 'txRate': '0.0', 'rxRate': '0.0',
'txErrors': '0', 'state': 'down', 'speed':
'1000', 'name': 'bond0'}, 'lo': {'sampleTime':
1432889690.469124, 'rxDropped': '0', 'tx': '4556517',
'rxErrors': '0', 'rx': '4556517', 'txDropped':
'0', 'txRate': '0.0', 'rxRate': '0.0',
'txErrors': '0', 'state': 'up', 'speed':
'1000', 'name': 'lo'}, 'dummy_3OnBX':
{'sampleTime': 1432889690.469124, 'rxDropped': '0', 'tx':
'0', 'rxErrors': '0', 'rx': '0',
'txDropped': '0', 'txRate': '0.0', 'rxRate':
'0.0', 'txErrors': '0', 'state': 'down',
'speed': '1000', 'name': 'dummy_3OnBX'},
'dummy_ZWNeo': {'sampleTime': 1432889690.469124, 'rxDropped':
'0', 'tx': '0', 'rxErrors': '0', 'rx':
'0', 'txDropped': '0', 'txRate': '0.0',
'rxRate': '0.0', 'txErrors': '0', 'state':
'down', 'speed': '1000', 'name': 'dummy_ZWNeo'},
';vdsmdummy;': {'sampleTime': 143288!
9690.469124, 'rxDropped': '0', 'tx': '0',
'rxErrors': '0', 'rx': '0', 'txDropped':
'0', 'txRate': '0.0', 'rxRate': '0.0',
'txErrors': '0', 'state': 'down', 'speed':
'1000', 'name': ';vdsmdummy;'}, 'dummy_Sa1vh':
{'sampleTime': 1432889690.469124, 'rxDropped': '0', 'tx':
'0', 'rxErrors': '0', 'rx': '0',
'txDropped': '0', 'txRate': '0.0', 'rxRate':
'0.0', 'txErrors': '0', 'state': 'down',
'speed': '1000', 'name': 'dummy_Sa1vh'},
'dummy_5Eslg': {'sampleTime': 1432889690.469124, 'rxDropped':
'0', 'tx': '54050', 'rxErrors': '0', 'rx':
'0', 'txDropped': '0', 'txRate': '0.0',
'rxRate': '0.0', 'txErrors': '0', 'state':
'up', 'speed': '1000', 'name': 'dummy_5Eslg'},
'dummy0': {'sampleTime': 1432889690.469124, 'rxDropped':
'0', 'tx': '0', 'rxErrors': '0', 'rx':
'0', 'txDropped': '0', 'txRate': '0.0',
'rxRate': '0.0', 'txErrors': '0', 'state':
'down', 'speed': '1000', 'name': 'dummy0'},
'dummy_YGKbY': {'sampleTime': 1432889690.469124, 'rxDropped':
'0', 'tx': '7538', 'rxErrors': '0', 'r!
x': '0', 'txDropped': '0', 'txRate': '0.0',
'rxRate': '0.0', 'txErrors': '0', 'state':
'up', 'speed': '1000', 'name': 'dummy_YGKbY'},
'eth0': {'sampleTime': 1432889690.469124, 'rxDropped':
'0', 'tx': '1386092', 'rxErrors': '0',
'rx': '29611812', 'txDropped': '0', 'txRate':
'0.0', 'rxRate': '0.0', 'txErrors': '0',
'state': 'up', 'speed': '1000', 'name':
'eth0'}}
======================================================================
FAIL: testSetupNetworksEmergencyDevicesCleanupVlanOverwrite(kwargs=False)
(functional.networkTests.NetworkTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/share/vdsm/tests/testlib.py", line 64, in wrapper
return f(self, *args)
File "/usr/share/vdsm/tests/testValidation.py", line 170, in wrapper
return f(*args, **kwargs)
File "/usr/share/vdsm/tests/functional/networkTests.py", line 194, in wrapper
func(*args, **kwargs)
File "/usr/share/vdsm/tests/functional/networkTests.py", line 2077, in
testSetupNetworksEmergencyDevicesCleanupVlanOverwrite
self.assertEquals(status, SUCCESS, msg)
AssertionError: nic dummy_5Eslg already enslaved to bond11
======================================================================
FAIL: test_getVdsStats (functional.networkTests.NetworkTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/share/vdsm/tests/functional/networkTests.py", line 194, in wrapper
func(*args, **kwargs)
File "/usr/share/vdsm/tests/testValidation.py", line 160, in wrapper
return f(*args, **kwargs)
File "/usr/share/vdsm/tests/testValidation.py", line 105, in wrapper
return f(*args, **kwargs)
File "/usr/share/vdsm/tests/functional/networkTests.py", line 381, in
test_getVdsStats
assertTestDevStatsReported, timeout=20)
File "/usr/share/vdsm/tests/testlib.py", line 162, in retryAssert
return retry(expectedException=AssertionError, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 1008, in retry
return func()
File "/usr/share/vdsm/tests/functional/networkTests.py", line 348, in
assertTestDevStatsReported
left, hostStats['network'], 'could not find veth %s' % left)
AssertionError: could not find veth veth_eA9OjRtPR7
-------------------- >> begin captured logging << --------------------
root: DEBUG: /usr/bin/nmcli conn load /etc/sysconfig/network-scripts/ifcfg-veth_eA9OjRtPR7
(cwd None)
root: DEBUG: SUCCESS: <err> = ''; <rc> = 0
root: DEBUG: /usr/bin/nmcli conn load /etc/sysconfig/network-scripts/ifcfg-veth_wS5S9Gh49V
(cwd None)
root: DEBUG: SUCCESS: <err> = ''; <rc> = 0
root: DEBUG: /sbin/ip link add name veth_eA9OjRtPR7 type veth peer name veth_wS5S9Gh49V
(cwd None)
root: DEBUG: SUCCESS: <err> = ''; <rc> = 0
root: DEBUG: /sbin/ip link set dev veth_eA9OjRtPR7 up (cwd None)
root: DEBUG: SUCCESS: <err> = ''; <rc> = 0
root: DEBUG: /sbin/ip link set dev veth_wS5S9Gh49V up (cwd None)
root: DEBUG: SUCCESS: <err> = ''; <rc> = 0
root: DEBUG: /sbin/ip link del dev veth_eA9OjRtPR7 (cwd None)
root: DEBUG: SUCCESS: <err> = ''; <rc> = 0
root: DEBUG: /usr/bin/nmcli conn load /etc/sysconfig/network-scripts/ifcfg-veth_eA9OjRtPR7
(cwd None)
root: DEBUG: SUCCESS: <err> = ''; <rc> = 0
root: DEBUG: /usr/bin/nmcli conn load /etc/sysconfig/network-scripts/ifcfg-veth_wS5S9Gh49V
(cwd None)
root: DEBUG: SUCCESS: <err> = ''; <rc> = 0
--------------------- >> end captured logging << ---------------------
----------------------------------------------------------------------
Ran 116 tests in 1229.748s
FAILED (failures=4)
--
To view, visit
https://gerrit.ovirt.org/36652
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6e63d5ceba72be91fdab5ffd9a71ceab398950b9
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Ondřej Svoboda <osvoboda(a)redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No