From 7323d8751538e06bb2dba106ba394bc6e29b8b84 Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Sat, 10 Aug 2013 16:12:59 -0400 Subject: [PATCH] Fix signature of _create_volume() in ThinLVMVolumeDriver 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 Change-Id: I18f7baf60601b3bcf01425b505a0579a826f072e --- cinder/volume/drivers/lvm.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cinder/volume/drivers/lvm.py b/cinder/volume/drivers/lvm.py index 6b5414297..83fd5a3c7 100644 --- a/cinder/volume/drivers/lvm.py +++ b/cinder/volume/drivers/lvm.py @@ -856,16 +856,11 @@ class ThinLVMVolumeDriver(LVMISCSIDriver): 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" % (self.configuration.volume_group, self.configuration.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.""" -- 2.45.2