LVMVolumeDriver is missing *_export functions

Bug #1293978 reported by glance
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Unassigned

Bug Description

I run a testenviorment of openstack on just one machine, and thus like to use the LVMVolumeDriver to minimize overhead and still use cinder.

The LVMVolumeDriver is missing *_export functions and thus fails on NotImplementedError for some operations.

I currently just hacked lvm.py and added:
"""
    def ensure_export(self, context, volume):
        pass

    def create_export(self, context, volume):
        pass

    def remove_export(self, context, volume):
        pass
"""

And now things work.

Tags: drivers lvm
Changed in cinder:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Eric Harney (eharney) wrote :

As noted by pylint:

************* Module cinder.volume.drivers.lvm
W: 58, 0: Method 'initialize_connection' is abstract in class 'VolumeDriver' but is not overridden (abstract-method)
W: 58, 0: Method 'ensure_export' is abstract in class 'VolumeDriver' but is not overridden (abstract-method)
W: 58, 0: Method 'remove_export' is abstract in class 'VolumeDriver' but is not overridden (abstract-method)
W: 58, 0: Method 'create_export' is abstract in class 'VolumeDriver' but is not overridden (abstract-method)
W: 58, 0: Method 'terminate_connection' is abstract in class 'VolumeDriver' but is not overridden (abstract-method)

Interesting use case as I haven't heard of anyone using LVMVolumeDriver like this directly, but it seems like a simple enough thing to fix up and may be handy for testing.

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

Another approach here may be to use iscsi_helper = 'fake' and the LVMISCSIDriver.

If that works then we should just implement something that yells if someone tries to use LVMVolumeDriver as the actual volume driver rather than ISCSI/ISER.

Revision history for this message
zhangyu (raliny0903) wrote :

if you set iscsi_helper = 'fake' and the LVMISCSIDriver,you can create a cinder volume.but when you want to attach the volume to a instance,that maybe failed ,because you didn't create a iscsi target.

Mike Perez (thingee)
tags: added: drivers lvm
Revision history for this message
Saggi Mizrahi (ficoos) wrote :

Looking at the code the methods are clearly there in lvm.py

Changed in cinder:
status: Confirmed → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: liberty-1 → 7.0.0
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.