SolidFire: Volume not found isn't properly handled in accept_transfer()

Bug #1357261 reported by Huang Zhiteng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
John Griffith

Bug Description

For some reason, when Solidfire driver tried to accept_transfer(), the backend failed to find the volume (the volume is there, but that is another issue to dig into), then the driver puked:

2014-08-14 14:54:48.350 36969 ERROR cinder.volume.drivers.solidfire [req-cc45c0a8-4760-4890-bd2a-93498fadad7b 6a08f3e43965436fb028eda1005ec77b b14c5ae7dd504e6c8ab1f8f2e568fb46] Volume cbb95e17-f66e-4081-b3aa-521889ed436d, not found on SF Cluster.
2014-08-14 14:54:48.351 36969 ERROR cinder.openstack.common.rpc.amqp [req-cc45c0a8-4760-4890-bd2a-93498fadad7b 6a08f3e43965436fb028eda1005ec77b b14c5ae7dd504e6c8ab1f8f2e568fb46] Exception during message handling
2014-08-14 14:54:48.351 36969 TRACE cinder.openstack.common.rpc.amqp Traceback (most recent call last):
2014-08-14 14:54:48.351 36969 TRACE cinder.openstack.common.rpc.amqp File "/opt/openstack/cinder/2013.2.3.r2.1/lib/python2.7/site-packages/cinder/openstack/common/rpc/amqp.py", line 441, in _process_data
2014-08-14 14:54:48.351 36969 TRACE cinder.openstack.common.rpc.amqp **args)
2014-08-14 14:54:48.351 36969 TRACE cinder.openstack.common.rpc.amqp File "/opt/openstack/cinder/2013.2.3.r2.1/lib/python2.7/site-packages/cinder/openstack/common/rpc/dispatcher.py", line 148, in dispatch
2014-08-14 14:54:48.351 36969 TRACE cinder.openstack.common.rpc.amqp return getattr(proxyobj, method)(ctxt, **kwargs)
2014-08-14 14:54:48.351 36969 TRACE cinder.openstack.common.rpc.amqp File "/opt/openstack/cinder/2013.2.3.r2.1/lib/python2.7/site-packages/cinder/volume/manager.py", line 731, in accept_transfer
2014-08-14 14:54:48.351 36969 TRACE cinder.openstack.common.rpc.amqp new_project)
2014-08-14 14:54:48.351 36969 TRACE cinder.openstack.common.rpc.amqp File "/opt/openstack/cinder/2013.2.3.r2.1/lib/python2.7/site-packages/cinder/volume/drivers/solidfire.py", line 750, in accept_transfer
2014-08-14 14:54:48.351 36969 TRACE cinder.openstack.common.rpc.amqp 'volumeID': sf_vol['volumeID'],
2014-08-14 14:54:48.351 36969 TRACE cinder.openstack.common.rpc.amqp TypeError: 'NoneType' object has no attribute '__getitem__'
2014-08-14 14:54:48.351 36969 TRACE cinder.openstack.common.rpc.amqp

accept_transfer() should handle Volume Not Found like attach/detach_volume() do.

tags: added: driver solidfire
Changed in cinder:
status: New → Triaged
Changed in cinder:
importance: Undecided → Medium
assignee: nobody → John Griffith (john-griffith)
milestone: none → juno-3
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/114695

Changed in cinder:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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

commit 7a72303aff86ba2b06c41e73b35989cddd884652
Author: John Griffith <email address hidden>
Date: Fri Aug 15 17:26:15 2014 -0600

    Catch vol not found in SolidFire transfer

    The accept_transfer call in SolidFire wasn't catching
    the volume_not found exception like it should be (and
    like other methods do).

    This patch just adds a check for volume is None on the
    get_volume call during accept_transfer and raises an
    appropriate exception if we run into that case.

    While we're at it, add some more detail to the "NotFound"
    error messages to include the driver operation as per
    request of reviewers.

    Change-Id: Ie6b56953028865eb06ebdaae3416339b8a371351
    Closes-Bug: #1357261

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: juno-3 → 2014.2
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.