NetApp driver unit tests fail with hash randomization enabled.
It is unclear whether this is a bug in the driver or just the tests, but it's possible that this indicates a real bug in the driver.
master @ 4d5f502e841
See a test run and some related fixes here: https://review.openstack.org/#/c/465636/
$ sed -i s/PYTHONHASHSEED=0/PYTHONHASHSEED=100/ tox.ini
$ tox -e py27 -- --regex cinder.tests.unit.volume.drivers.netapp
==============================
Failed 4 tests - output below:
==============================
cinder.tests.unit.volume.drivers.netapp.dataontap.performance.test_perf_cmode.PerformanceCmodeLibraryTestCase.test_update_performance_cache_first_pass
------------------------------------------------------------------------------------------------------------------------------------------------------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "cinder/tests/unit/volume/drivers/netapp/dataontap/performance/test_perf_cmode.py", line 196, in test_update_performance_cache_first_pass
self.perf_library.performance_counters)
File "/home/eharney/src/cinder-review5/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual
self.assertThat(observed, matcher, message)
File "/home/eharney/src/cinder-review5/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: {'node2': [21], 'node1': [11]} != {'node2': [11], 'node1': [21]}
cinder.tests.unit.volume.drivers.netapp.dataontap.test_block_base.NetAppBlockStorageLibraryTestCase.test_build_initiator_target_map_with_lookup_service
-------------------------------------------------------------------------------------------------------------------------------------------------------
Captured pythonlogging:
~~~~~~~~~~~~~~~~~~~~~~~
2017-09-08 10:10:30,519 WARNING [cinder.volume.drivers.netapp.utils] It is not the recommended way to use drivers by NetApp. Please use NetAppDriver to achieve the functionality.
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/home/eharney/src/cinder-review5/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
return func(*args, **keywargs)
File "cinder/tests/unit/volume/drivers/netapp/dataontap/test_block_base.py", line 425, in test_build_initiator_target_map_with_lookup_service
self.assertDictEqual(fake.FC_I_T_MAP, init_targ_map)
File "/home/eharney/src/cinder-review5/.tox/py27/lib/python2.7/site-packages/unittest2/case.py", line 1128, in assertDictEqual
self.fail(self._formatMessage(msg, standardMsg))
File "/home/eharney/src/cinder-review5/.tox/py27/lib/python2.7/site-packages/unittest2/case.py", line 690, in fail
raise self.failureException(msg)
AssertionError: {'210[21 chars]a098280feeba5', '500a098290feeba5'], '21000024[47 chars]a5']} != {'210[21 chars]a098290feeba5', '500a098280feeba5'], '21000024[47 chars]a5']}
- {'21000024ff406cc2': ['500a098190feeba5', '500a098180feeba5'],
- '21000024ff406cc3': ['500a098280feeba5', '500a098290feeba5']}
? ^ ^ ^ ^ ^
+ {'21000024ff406cc2': ['500a098180feeba5', '500a098190feeba5'],
? ^ ^ ^ ^ ^
+ '21000024ff406cc3': ['500a098290feeba5', '500a098280feeba5']}
cinder.tests.unit.volume.drivers.netapp.dataontap.performance.test_perf_cmode.PerformanceCmodeLibraryTestCase.test_update_performance_cache
-------------------------------------------------------------------------------------------------------------------------------------------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "cinder/tests/unit/volume/drivers/netapp/dataontap/performance/test_perf_cmode.py", line 164, in test_update_performance_cache
self.perf_library.performance_counters)
File "/home/eharney/src/cinder-review5/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual
self.assertThat(observed, matcher, message)
File "/home/eharney/src/cinder-review5/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = {'node1': [12, 13, 14, 15, 16, 17, 18, 19, 20, 21],
'node2': [22, 23, 24, 25, 26, 27, 28, 29, 30, 31]}
actual = {'node1': [12, 13, 14, 15, 16, 17, 18, 19, 20, 31],
'node2': [22, 23, 24, 25, 26, 27, 28, 29, 30, 21]}
cinder.tests.unit.volume.drivers.netapp.eseries.test_library.NetAppEseriesLibraryTestCase.test_build_initiator_target_map_fc_with_lookup_service
------------------------------------------------------------------------------------------------------------------------------------------------
Captured pythonlogging:
~~~~~~~~~~~~~~~~~~~~~~~
2017-09-08 10:10:41,321 WARNING [cinder.volume.drivers.netapp.eseries.library] Production use of "NetApp_ESeries" backend requires the Cinder controller to have multipathing properly set up and the configuration option "use_multipath_for_image_xfer" to be set to "True".
2017-09-08 10:10:41,321 INFO [cinder.volume.drivers.netapp.eseries.library] System 1fa6efb5-f07b-4de4-9f0e-52e5f7ff5d1b has needsattn status.
2017-09-08 10:10:41,322 WARNING [oslo_config.cfg] Config option None.netapp_storage_pools is deprecated. Use option backend1.netapp_pool_name_search_pattern instead.
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "cinder/tests/unit/volume/drivers/netapp/eseries/test_library.py", line 987, in test_build_initiator_target_map_fc_with_lookup_service
self.assertDictEqual(eseries_fake.FC_I_T_MAP, initiator_target_map)
File "/home/eharney/src/cinder-review5/.tox/py27/lib/python2.7/site-packages/unittest2/case.py", line 1128, in assertDictEqual
self.fail(self._formatMessage(msg, standardMsg))
File "/home/eharney/src/cinder-review5/.tox/py27/lib/python2.7/site-packages/unittest2/case.py", line 690, in fail
raise self.failureException(msg)
AssertionError: {'201[21 chars]a098190feeba5', '500a098180feeba5'], '20230080[47 chars]a5']} != {'201[21 chars]a098180feeba5', '500a098190feeba5'], '20230080[47 chars]a5']}
- {'20130080E5322230': ['500a098190feeba5', '500a098180feeba5'],
- '20230080E5322230': ['500a098280feeba5', '500a098290feeba5']}
? ^ ^ ^ ^ ^
+ {'20130080E5322230': ['500a098180feeba5', '500a098190feeba5'],
? ^ ^ ^ ^ ^
+ '20230080E5322230': ['500a098290feeba5', '500a098280feeba5']}
======
Totals
======
Ran: 1564 tests in 39.0000 sec.
- Passed: 1560
- Skipped: 0
- Expected Fail: 0
- Unexpected Success: 0
- Failed: 4
Sum of execute time for each test: 75.5792 sec.
Goutham,
Are you working on this? Any chance this might get some attention soon?
Thanks!