Skip to content

Commit

Permalink
Fix signature of _create_volume() in ThinLVMVolumeDriver
Browse files Browse the repository at this point in the history
create_volume_from_snapshot will call _create_volume() with the
wrong parameters when using ThinLVMVolumeDriver.  It should be
compatible with LVMVolumeDriver's _create_volume() method.

Fixes bug: 1210853

Conflicts:
	cinder/volume/drivers/lvm.py

(cherry picked from commit 7323d87)
Change-Id: I18f7baf60601b3bcf01425b505a0579a826f072e
  • Loading branch information
eharney committed Aug 10, 2013
1 parent ec0eecc commit 74a2154
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions cinder/volume/drivers/lvm.py
Expand Up @@ -629,15 +629,10 @@ def _do_lvm_snapshot(self, src_lvm_name, dest_vref, is_cinder_snap=True):
self._try_execute('lvcreate', '-s', '-n', new_name,
src_lvm_name, run_as_root=True)

def _create_volume(self, volume):
sizestr = self._sizestr(volume['size'])
def _create_volume(self, volume_name, sizestr):
vg_name = ("%s/%s-pool" % (FLAGS.volume_group, FLAGS.volume_group))
self._try_execute('lvcreate', '-T', '-V', sizestr, '-n',
volume['name'], vg_name, run_as_root=True)

def create_volume(self, volume):
"""Creates a logical volume."""
self._create_volume(volume)
volume_name, vg_name, run_as_root=True)

def delete_volume(self, volume):
"""Deletes a logical volume."""
Expand Down

0 comments on commit 74a2154

Please sign in to comment.