While running rally test "create_and_restore_volume_backup" concurrently, test failed with below error
2017-01-11 00:36:26.176 _[00;32mDEBUG cinder.volume.drive...2017-01-11 00:36:26.176 [00;32mDEBUG cinder.volume.drivers.hpe.hpe_lefthand_iscsi [[01;36mreq-7392f27b-ad00-4272-9940-f2b693e039d6 [00;36m3c6f12c2c200420ab203999a7cf4b9a5 c606c14351a04fccb8210f2a9b8743ba[00;32m] [01;35m[00;32m<== initialize_connection: exception (209ms) VolumeBackendAPIException(u'Error (HTTP 500) SERVER_ALREADY_EXISTS - The server with the name "csimbe13-b14" already exists. Use a unique name and try again.',)[00m [00;33mfrom (pid=5717) trace_logging_wrapper /opt/stack/cinder/cinder/utils.py:901[00m
2017-01-11 00:36:26.176 [01;31mERROR cinder.volume.manager [[01;36mreq-7392f27b-ad00-4272-9940-f2b693e039d6 [00;36m3c6f12c2c200420ab203999a7cf4b9a5 c606c14351a04fccb8210f2a9b8743ba[01;31m] [01;35m[01;31mDriver initialize connection failed (error: Error (HTTP 500) SERVER_ALREADY_EXISTS - The server with the name "csimbe13-b14" already exists. Use a unique name and try again.).[00m
[01;31m2017-01-11 00:36:26.176 TRACE cinder.volume.manager [01;35m[00mTraceback (most recent call last):
[01;31m2017-01-11 00:36:26.176 TRACE cinder.volume.manager [01;35m[00m File "/opt/stack/cinder/cinder/volume/manager.py", line 1429, in initialize_connection
[01;31m2017-01-11 00:36:26.176 TRACE cinder.volume.manager [01;35m[00m conn_info = self.driver.initialize_connection(volume, connector)
[01;31m2017-01-11 00:36:26.176 TRACE cinder.volume.manager [01;35m[00m File "/opt/stack/cinder/cinder/utils.py", line 895, in trace_logging_wrapper
[01;31m2017-01-11 00:36:26.176 TRACE cinder.volume.manager [01;35m[00m result = f(*args, **kwargs)
[01;31m2017-01-11 00:36:26.176 TRACE cinder.volume.manager [01;35m[00m File "/opt/stack/cinder/cinder/volume/drivers/hpe/hpe_lefthand_iscsi.py", line 746, in initialize_connection
[01;31m2017-01-11 00:36:26.176 TRACE cinder.volume.manager [01;35m[00m raise exception.VolumeBackendAPIException(ex)
[01;31m2017-01-11 00:36:26.176 TRACE cinder.volume.manager [01;35m[00mVolumeBackendAPIException: Error (HTTP 500) SERVER_ALREADY_EXISTS - The server with the name "csimbe13-b14" already exists. Use a unique name and try again.
[01;31m2017-01-11 00:36:26.176 TRACE cinder.volume.manager [01;35m[00m
2017-01-11 00:36:26.178 [01;31mERROR oslo_messaging.rpc.server [[01;36mreq-7392f27b-ad00-4272-9940-f2b693e039d6 [00;36m3c6f12c2c200420ab203999a7cf4b9a5 c606c14351a04fccb8210f2a9b8743ba[01;31m] [01;35m[01;31mException during message handling[00m
[01;31m2017-01-11 00:36:26.178 TRACE oslo_messaging.rpc.server [01;35m[00mTraceback (most recent call last):
[01;31m2017-01-11 00:36:26.178 TRACE oslo_messaging.rpc.server [01;35m[00m File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 133, in _process_incoming
[01;31m2017-01-11 00:36:26.178 TRACE oslo_messaging.rpc.server [01;35m[00m res = self.dispatcher.dispatch(message)
[01;31m2017-01-11 00:36:26.178 TRACE oslo_messaging.rpc.server [01;35m[00m File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 150, in dispatch
[01;31m2017-01-11 00:36:26.178 TRACE oslo_messaging.rpc.server [01;35m[00m return self._do_dispatch(endpoint, method, ctxt, args)
[01;31m2017-01-11 00:36:26.178 TRACE oslo_messaging.rpc.server [01;35m[00m File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 121, in _do_dispatch
[01;31m2017-01-11 00:36:26.178 TRACE oslo_messaging.rpc.server [01;35m[00m result = func(ctxt, **new_args)
[01;31m2017-01-11 00:36:26.178 TRACE oslo_messaging.rpc.server [01;35m[00m File "/opt/stack/cinder/cinder/volume/manager.py", line 4400, in initialize_connection
[01;31m2017-01-11 00:36:26.178 TRACE oslo_messaging.rpc.server [01;35m[00m connector, volume=volume)
[01;31m2017-01-11 00:36:26.178 TRACE oslo_messaging.rpc.server [01;35m[00m File "/opt/stack/cinder/cinder/volume/manager.py", line 1437, in initialize_connection
[01;31m2017-01-11 00:36:26.178 TRACE oslo_messaging.rpc.server [01;35m[00m raise exception.VolumeBackendAPIException(data=err_msg)
[01;31m2017-01-11 00:36:26.178 TRACE oslo_messaging.rpc.server [01;35m[00mVolumeBackendAPIException: Bad or unexpected response from the storage volume backend API: Driver initialize connection failed (error: Error (HTTP 500) SERVER_ALREADY_EXISTS - The server with the name "csimbe13-b14" already exists. Use a unique name and try again.).
[01;31m2017-01-11 00:36:26.178 TRACE oslo_messaging.rpc.server [01;35m[00m
As per the previous bug https:/ /bugs.launchpad .net/cinder/ +bug/1658888 filed against HPE 3PAR driver. Cause of failure is, multiple threads are trying to enter in initialize_ connection OR terminate_ connection method at the same time which leads to an above error.
Fix is to apply lock on those methods.