test case 'tempest.api.volume.admin.test_volumes_actions.VolumesActionsTest.test_force_detach_volume' introduced by https://review.openstack.org/#/c/436400/ failed without connector information.
======
2017-04-25 22:09:41.157 9375 ERROR cinder.volume.manager [req-ba63e390-9653-465c-afd8-810eed42c74d tempest-VolumesActionsTest-975408085 -] Terminate volume connection failed: argument of type 'NoneType' is not iterable
2017-04-25 22:09:41.157 9375 ERROR cinder.volume.manager Traceback (most recent call last):
2017-04-25 22:09:41.157 9375 ERROR cinder.volume.manager File "/opt/stack/new/cinder/cinder/volume/manager.py", line 1555, in terminate_connection
2017-04-25 22:09:41.157 9375 ERROR cinder.volume.manager force=force)
2017-04-25 22:09:41.157 9375 ERROR cinder.volume.manager File "/opt/stack/new/cinder/cinder/zonemanager/utils.py", line 104, in decorator
2017-04-25 22:09:41.157 9375 ERROR cinder.volume.manager conn_info = terminate_connection(self, *args, **kwargs)
2017-04-25 22:09:41.157 9375 ERROR cinder.volume.manager File "/opt/stack/new/cinder/cinder/volume/drivers/dell_emc/vnx/driver.py", line 207, in terminate_connection
2017-04-25 22:09:41.157 9375 ERROR cinder.volume.manager conn_info = self.adapter.terminate_connection(volume, connector)
2017-04-25 22:09:41.157 9375 ERROR cinder.volume.manager File "/opt/stack/new/cinder/cinder/volume/drivers/dell_emc/vnx/adapter.py", line 989, in terminate_connection
2017-04-25 22:09:41.157 9375 ERROR cinder.volume.manager return self._terminate_connection(volume, connector)
2017-04-25 22:09:41.157 9375 ERROR cinder.volume.manager File "/opt/stack/new/cinder/cinder/volume/drivers/dell_emc/vnx/adapter.py", line 999, in _terminate_connection
2017-04-25 22:09:41.157 9375 ERROR cinder.volume.manager host = self.build_host(connector)
2017-04-25 22:09:41.157 9375 ERROR cinder.volume.manager File "/opt/stack/new/cinder/cinder/volume/drivers/dell_emc/vnx/adapter.py", line 1484, in build_host
2017-04-25 22:09:41.157 9375 ERROR cinder.volume.manager if 'wwnns' not in connector or 'wwpns' not in connector:
2017-04-25 22:09:41.157 9375 ERROR cinder.volume.manager TypeError: argument of type 'NoneType' is not iterable
====
seems the force_detach_volume does not pass any 'connector' information to driver.
detailed logs:
http://publiclogs.emc.com/vnx_ostack/EMC_VNX_FC/317/logs/screen-c-vol.txt.gz
http://openstack.falconstor.com/40/445440/7/check/dsvm-cinder-fss-iscsi/ec83331/logs/screen-c-vol.txt.gz
Codes below is in cinder/ api/contrib/ admin_actions. py. That we can find that the connector can be set to None. Here I think /cinder/ cinder/ volume/ drivers/ dell_emc/ vnx/driver. py should handle the scenario when connector is None.
@wsgi. action( 'os-force_ detach' ) 'cinder. context' ]
self.authorize (context, 'force_detach')
connector = body['os- force_detach' ].get(' connector' , None) HTTPBadRequest(
explanation= _("Must specify 'connector'."))
self. volume_ api.terminate_ connection( context, volume, connector) VolumeBackendAP IException as error: HTTPInternalSer verError( explanation= msg)
def _force_detach(self, req, id, body):
"""Roll back a bad detach after the volume been disconnected."""
context = req.environ[
# Not found exception will be handled at the wsgi level
volume = self._get(context, id)
try:
except KeyError:
raise webob.exc.
try:
except exception.
msg = _("Unable to terminate volume connection from backend.")
raise webob.exc.
......