From: Emilien Macchi Date: Wed, 31 Jul 2013 14:47:37 +0000 (+0200) Subject: LVM / Block Device Drivers: Fix duplicated flags X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=25cae8b320481947698ed6a73ef9ed260436a69c;p=openstack-build%2Fcinder-build.git 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 --- diff --git a/cinder/volume/drivers/block_device.py b/cinder/volume/drivers/block_device.py index b94be1bf3..f4edbaa94 100644 --- a/cinder/volume/drivers/block_device.py +++ b/cinder/volume/drivers/block_device.py @@ -43,6 +43,9 @@ volume_opts = [ '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 5dcd3656d..961a1a054 100644 --- a/cinder/volume/drivers/lvm.py +++ b/cinder/volume/drivers/lvm.py @@ -42,13 +42,6 @@ volume_opts = [ 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 @@ volume_opts = [ 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):