LVM does not implement unmanage

Bug #1493544 reported by Eric Harney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Eric Harney
Kilo
Fix Released
Undecided
Eric Harney

Bug Description

Volume unmanage:

2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher executor_callback))
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher executor_callback)
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 129, in _do_dispatch
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher return f(*args, **kwargs)
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/cinder/cinder/volume/manager.py", line 144, in lvo_inner1
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher return lvo_inner2(inst, context, volume_id, **kwargs)
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 252, in inner
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher return f(*args, **kwargs)
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/cinder/cinder/volume/manager.py", line 143, in lvo_inner2
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher return f(*_args, **_kwargs)
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/cinder/cinder/volume/manager.py", line 600, in delete_volume
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher 'error_deleting')
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 119, in __exit__
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/cinder/cinder/volume/manager.py", line 584, in delete_volume
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher self.driver.unmanage(volume_ref)
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher return f(*args, **kwargs)
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher File "/opt/stack/cinder/cinder/volume/driver.py", line 1961, in unmanage
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher raise NotImplementedError(msg)
2015-09-08 15:59:49.414 TRACE oslo_messaging.rpc.dispatcher NotImplementedError: Unmanage volume not implemented.

It appears that only volume drivers inheriting from ManageableVD support unmanage. This is a regression from Kilo behavior.

Previous behavior: http://git.openstack.org/cgit/openstack/cinder/tree/cinder/volume/driver.py?h=stable/juno&id=9c0a64f3#n690

Revision history for this message
Eric Harney (eharney) wrote :

Appears to have been introduced by https://review.openstack.org/#/c/127455/ .

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/221497

Changed in cinder:
assignee: nobody → Eric Harney (eharney)
status: New → In Progress
Eric Harney (eharney)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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

commit bf22aeb185afe8de0db526c83e50c15113f84d88
Author: Eric Harney <email address hidden>
Date: Tue Sep 8 16:23:45 2015 -0400

    Add unmanage default implementation to VolumeDriver

    Currently, only drivers that inherit from ManageableVD
    get the default unmanage() implementation.

    This is not correct, because drivers can support unmanage
    without driver code. Fix unmanage() in VolumeDriver to
    support the LVM driver's unmanage operation.

    (Regression from the refactoring done when introducing
    abc classes.)

    Closes-Bug: #1493544

    Change-Id: Iaacf10141559a2c88b5873722d1e237dc9223f27

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → liberty-rc1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/233146

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (stable/kilo)

Change abandoned by Eric Harney (<email address hidden>) on branch: stable/kilo
Review: https://review.openstack.org/233146
Reason: Needs more work, will follow up later.

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

Reviewed: https://review.openstack.org/233146
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=53f67159fa8afae83e046fc2cfb9d2cc2bc2e2c4
Submitter: Jenkins
Branch: stable/kilo

commit 53f67159fa8afae83e046fc2cfb9d2cc2bc2e2c4
Author: Eric Harney <email address hidden>
Date: Tue Sep 8 16:23:45 2015 -0400

    Add unmanage default implementation to VolumeDriver

    Currently, only drivers that inherit from ManageableVD
    get the default unmanage() implementation.

    This is not correct, because drivers can support unmanage
    without driver code. Fix unmanage() in VolumeDriver to
    support the LVM driver's unmanage operation.

    (Regression from the refactoring done when introducing
    abc classes.)

    Closes-Bug: #1493544

    Change-Id: Iaacf10141559a2c88b5873722d1e237dc9223f27
    (cherry picked from commit bf22aeb185afe8de0db526c83e50c15113f84d88)
    Conflicts:
     cinder/tests/test_volume.py

tags: added: in-stable-kilo
Thierry Carrez (ttx)
Changed in cinder:
milestone: liberty-rc1 → 7.0.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Eric Harney (<email address hidden>) on branch: master
Review: https://review.openstack.org/310949

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.