From 79a402d07502ac34bc0ec485b21b0be50ba807a7 Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Wed, 19 Jun 2013 16:31:07 -0400 Subject: [PATCH] Add _create_volume to ThinLVMVolumeDriver Previously, _create_volume from LVMISCSIDriver would be called when the volume manager calls create_volume_from_snapshot. Fixes bug: 1192601 Change-Id: I5cca287e8204c4647a5f09df961d9a76d0b38c42 --- cinder/volume/drivers/lvm.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cinder/volume/drivers/lvm.py b/cinder/volume/drivers/lvm.py index 3c214cc5f..756b4d66d 100644 --- a/cinder/volume/drivers/lvm.py +++ b/cinder/volume/drivers/lvm.py @@ -643,16 +643,17 @@ class ThinLVMVolumeDriver(LVMISCSIDriver): self._try_execute('lvcreate', '-s', '-n', new_name, src_lvm_name, run_as_root=True) - def create_volume(self, volume): - """Creates a logical volume. Can optionally return a Dictionary of - changes to the volume object to be persisted. - """ + def _create_volume(self, volume): sizestr = self._sizestr(volume['size']) 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) + def delete_volume(self, volume): """Deletes a logical volume.""" if self._volume_not_present(volume['name']): -- 2.45.2