Pure drivers require connector object in terminate_connection

Bug #1696215 reported by Patrick East
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Patrick East

Bug Description

Pure volume drivers are expecting a connector object in termiante_connection... guess the driver api is a little vague here and os-force-detach can actually allow this. See stack trace below:

Jun 06 16:24:43.047653 dsvm-xenial-FC-aio-2197229 cinder-volume[26819]: DEBUG cinder.volume.drivers.pure [None req-56b4dfa6-fa21-46b3-90c7-104d605e9686 tempest-VolumesActionsTest-718843712 None] [puredriver-1] Enter PureFCDriver.terminate_connection {{(pid=26935) wrapper /opt/stack/new/cinder/cinder/volume/drivers/pure.py:135}}
Jun 06 16:24:43.081638 dsvm-xenial-FC-aio-2197229 cinder-volume[26819]: ERROR cinder.volume.manager [None req-56b4dfa6-fa21-46b3-90c7-104d605e9686 tempest-VolumesActionsTest-718843712 None] Terminate volume connection failed: 'NoneType' object has no attribute '__getitem__': TypeError: 'NoneType' object has no attribute '__getitem__'
Jun 06 16:24:43.081818 dsvm-xenial-FC-aio-2197229 cinder-volume[26819]: ERROR cinder.volume.manager Traceback (most recent call last):
Jun 06 16:24:43.081969 dsvm-xenial-FC-aio-2197229 cinder-volume[26819]: ERROR cinder.volume.manager File "/opt/stack/new/cinder/cinder/volume/manager.py", line 1625, in terminate_connection
Jun 06 16:24:43.082106 dsvm-xenial-FC-aio-2197229 cinder-volume[26819]: ERROR cinder.volume.manager force=force)
Jun 06 16:24:43.082239 dsvm-xenial-FC-aio-2197229 cinder-volume[26819]: ERROR cinder.volume.manager File "/opt/stack/new/cinder/cinder/zonemanager/utils.py", line 104, in decorator
Jun 06 16:24:43.082379 dsvm-xenial-FC-aio-2197229 cinder-volume[26819]: ERROR cinder.volume.manager conn_info = terminate_connection(self, *args, **kwargs)
Jun 06 16:24:43.082528 dsvm-xenial-FC-aio-2197229 cinder-volume[26819]: ERROR cinder.volume.manager File "/opt/stack/new/cinder/cinder/volume/drivers/pure.py", line 136, in wrapper
Jun 06 16:24:43.082682 dsvm-xenial-FC-aio-2197229 cinder-volume[26819]: ERROR cinder.volume.manager result = f(*args, **kwargs)
Jun 06 16:24:43.082823 dsvm-xenial-FC-aio-2197229 cinder-volume[26819]: ERROR cinder.volume.manager File "/opt/stack/new/cinder/cinder/volume/drivers/pure.py", line 2000, in terminate_connection
Jun 06 16:24:43.082976 dsvm-xenial-FC-aio-2197229 cinder-volume[26819]: ERROR cinder.volume.manager connector, **kwargs)
Jun 06 16:24:43.083107 dsvm-xenial-FC-aio-2197229 cinder-volume[26819]: ERROR cinder.volume.manager File "/opt/stack/new/cinder/cinder/volume/drivers/pure.py", line 432, in _disconnect
Jun 06 16:24:43.083244 dsvm-xenial-FC-aio-2197229 cinder-volume[26819]: ERROR cinder.volume.manager host = self._get_host(array, connector)
Jun 06 16:24:43.083373 dsvm-xenial-FC-aio-2197229 cinder-volume[26819]: ERROR cinder.volume.manager File "/opt/stack/new/cinder/cinder/volume/drivers/pure.py", line 1906, in _get_host
Jun 06 16:24:43.083512 dsvm-xenial-FC-aio-2197229 cinder-volume[26819]: ERROR cinder.volume.manager for wwn in connector["wwpns"]:
Jun 06 16:24:43.083714 dsvm-xenial-FC-aio-2197229 cinder-volume[26819]: ERROR cinder.volume.manager TypeError: 'NoneType' object has no attribute '__getitem__'
Jun 06 16:24:43.083922 dsvm-xenial-FC-aio-2197229 cinder-volume[26819]: ERROR cinder.volume.manager
Jun 06 16:24:43.084068 dsvm-xenial-FC-aio-2197229 cinder-volume[26819]: ERROR oslo_messaging.rpc.server [None req-56b4dfa6-fa21-46b3-90c7-104d605e9686 tempest-VolumesActionsTest-718843712 None] Exception during message handling: VolumeBackendAPIException: Bad or unexpected response from the storage volume backend API: Terminate volume connection failed: 'NoneType' object has no attribute '__getitem__'

This only happens in the force detach case, and only with the "old" style of attaches... unfortunately without the connector we can't do much since we don't know what host to remove the volume from.

Changed in cinder:
status: New → In Progress
assignee: nobody → Patrick East (patrick-east)
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/471861

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/471861
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=e9cd1bc89e5610de84b116d6c3687d4f796f527c
Submitter: Jenkins
Branch: master

commit e9cd1bc89e5610de84b116d6c3687d4f796f527c
Author: Patrick East <email address hidden>
Date: Tue Jun 6 13:51:01 2017 -0700

    Allow Pure drivers to handle detach with no host

    Apparently force-detach is ok with no connector
    object passed in. This changes the driver to assume
    that no connector means just detach the volume from
    anything its attached to.

    I updated the base driver to document this quirk
    too.

    This should only ever happen with force detach and
    "old" style connections, which means multi-attach
    shouldn't be in the picture so this is kind of
    safe... probably..

    Change-Id: Ia0710d66bdbc85afffdb6e4f22f3ce6ca642ec75
    Closes-Bug: #1696215

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 11.0.0.0b3

This issue was fixed in the openstack/cinder 11.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.