From 25cae8b320481947698ed6a73ef9ed260436a69c Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 31 Jul 2013 16:47:37 +0200 Subject: [PATCH] LVM / Block Device Drivers: Fix duplicated flags - Import in lvm driver the duplicated flags from block_device driver. - Register volume_opts in block_device drivers Fix bug #1206944 Change-Id: Icb2c9411be060065ecf5efed293bacd6b735e299 --- cinder/volume/drivers/block_device.py | 3 +++ cinder/volume/drivers/lvm.py | 9 ++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/cinder/volume/drivers/block_device.py b/cinder/volume/drivers/block_device.py index b94be1bf37..f4edbaa947 100644 --- a/cinder/volume/drivers/block_device.py +++ b/cinder/volume/drivers/block_device.py @@ -43,6 +43,9 @@ 'none, zero, shred)'), ] +CONF = cfg.CONF +CONF.register_opts(volume_opts) + class BlockDeviceDriver(driver.ISCSIDriver): VERSION = '1.0' diff --git a/cinder/volume/drivers/lvm.py b/cinder/volume/drivers/lvm.py index 5dcd3656dd..961a1a0547 100644 --- a/cinder/volume/drivers/lvm.py +++ b/cinder/volume/drivers/lvm.py @@ -42,13 +42,6 @@ cfg.StrOpt('volume_group', default='cinder-volumes', help='Name for the VG that will contain exported volumes'), - cfg.StrOpt('volume_clear', - default='zero', - help='Method used to wipe old volumes (valid options are: ' - 'none, zero, shred)'), - cfg.IntOpt('volume_clear_size', - default=0, - help='Size in MiB to wipe at start of old volumes. 0 => all'), cfg.StrOpt('pool_size', default=None, help='Size of thin provisioning pool ' @@ -61,6 +54,8 @@ CONF = cfg.CONF CONF.register_opts(volume_opts) +CONF.import_opt('volume_clear', 'cinder.volume.drivers.block_device') +CONF.import_opt('volume_clear_size', 'cinder.volume.drivers.block_device') class LVMVolumeDriver(driver.VolumeDriver):