The IBM FlashSystem driver has been failing test_force_detached_volume since a change was introduced for bug 1619647 that allows users to request force detach with no connector. Here is a log excerpt from a failed run showing the error:
2019-02-26 15:59:17.942 37 ERROR cinder.volume.manager [req-bb867c75-bfad-43e6-a4e8-b3a76ef5248b 52c5e76f87e84c18990197ef4c22eb7b 3dfb6d7e651841a3aa3e689f4e785c65 - default default] Terminate volume connection failed: argument of type 'NoneType' is not iterable: TypeError: argument of type 'NoneType' is not iterable
2019-02-26 15:59:17.942 37 ERROR cinder.volume.manager Traceback (most recent call last):
2019-02-26 15:59:17.942 37 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 1816, in terminate_connection
2019-02-26 15:59:17.942 37 ERROR cinder.volume.manager force=force)
2019-02-26 15:59:17.942 37 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 274, in inner
2019-02-26 15:59:17.942 37 ERROR cinder.volume.manager return f(*args, **kwargs)
2019-02-26 15:59:17.942 37 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/ibm/flashsystem_fc.py", line 344, in terminate_connection
2019-02-26 15:59:17.942 37 ERROR cinder.volume.manager self._unmap_vdisk_from_host(vdisk_name, connector)
2019-02-26 15:59:17.942 37 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 274, in inner
2019-02-26 15:59:17.942 37 ERROR cinder.volume.manager return f(*args, **kwargs)
2019-02-26 15:59:17.942 37 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/ibm/flashsystem_common.py", line 902, in _unmap_vdisk_from_host
2019-02-26 15:59:17.942 37 ERROR cinder.volume.manager if 'host' in connector:
2019-02-26 15:59:17.942 37 ERROR cinder.volume.manager TypeError: argument of type 'NoneType' is not iterable
2019-02-26 15:59:17.942 37 ERROR cinder.volume.manager
2019-02-26 15:59:17.943 37 ERROR oslo_messaging.rpc.server [req-bb867c75-bfad-43e6-a4e8-b3a76ef5248b 52c5e76f87e84c18990197ef4c22eb7b 3dfb6d7e651841a3aa3e689f4e785c65 - default default] Exception during message handling: VolumeBackendAPIException: Bad or unexpected response from the storage volume backend API: Terminate volume connection failed: argument of type 'NoneType' is not iterable
2019-02-26 15:59:17.943 37 ERROR oslo_messaging.rpc.server Traceback (most recent call last):
2019-02-26 15:59:17.943 37 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 163, in _process_incoming
2019-02-26 15:59:17.943 37 ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
2019-02-26 15:59:17.943 37 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 265, in dispatch
2019-02-26 15:59:17.943 37 ERROR oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
2019-02-26 15:59:17.943 37 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 194, in _do_dispatch
2019-02-26 15:59:17.943 37 ERROR oslo_messaging.rpc.server result = func(ctxt, **new_args)
2019-02-26 15:59:17.943 37 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 1821, in terminate_connection
2019-02-26 15:59:17.943 37 ERROR oslo_messaging.rpc.server raise exception.VolumeBackendAPIException(data=err_msg)
2019-02-26 15:59:17.943 37 ERROR oslo_messaging.rpc.server VolumeBackendAPIException: Bad or unexpected response from the storage volume backend API: Terminate volume connection failed: argument of type 'NoneType' is not iterable
The driver needs to be changed to produce the expected response in this scenario, which is to destroy all the volume's attachments.
Fix proposed to branch: master /review. opendev. org/658884
Review: https:/