The block_device driver pulled in the clear and clear_size
options for it's own use and broke the inheritance model needed
for multiple backend configs.
This change moves the two configs up higher in the heirarchy to
driver.py so that it can be shared/used by all drivers if they desire.
This means that they are now set properly in volume_opts. At some
point we shoudl restructure this a bit to allow multi-backends to
specify independent settings for these configs.
Fixes bug:
1208964
Change-Id: I6afbdecea637f7e7d3417be537ab71fe97bffda3
"""
import os
-import socket
import time
from oslo.config import cfg
cfg.BoolOpt('use_multipath_for_image_xfer',
default=False,
help='Do we attach/detach volumes in cinder using multipath '
- 'for volume to image and image to volume transfers?'), ]
+ 'for volume to image and image to volume transfers?'),
+ cfg.StrOpt('volume_clear',
+ default='zero',
+ help='Method used to wipe old voumes (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'), ]
+
CONF = cfg.CONF
CONF.register_opts(volume_opts)
cfg.ListOpt('available_devices',
default=[],
help='List of all available devices'),
- cfg.IntOpt('volume_clear_size',
- default=0,
- help='Size in MiB to wipe at start of old volumes. 0 => all'),
- cfg.StrOpt('volume_clear',
- default='zero',
- help='Method used to wipe old volumes (valid options are: '
- 'none, zero, shred)'),
]
CONF = cfg.CONF
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):