Remove deprecated lvm_max_over_subscription_ratio
This setting was deprecated in in the Queens release in change Ib90cdb1f60741284ea171d1a84ad74beac43c7d3 and is now removed. Change-Id: Ib3947d48e7f319bf74c9b916c7dee19c89202e4f
This commit is contained in:
parent
1d31f244c8
commit
2c05388d5c
@ -849,26 +849,6 @@ class LVMVolumeDriverTestCase(test_driver.BaseDriverTestCase):
|
|||||||
'extra_info': None}]
|
'extra_info': None}]
|
||||||
self.assertEqual(exp, res)
|
self.assertEqual(exp, res)
|
||||||
|
|
||||||
# Global setting, LVM setting, expected outcome
|
|
||||||
@ddt.data((10.0, 2.0, 2.0))
|
|
||||||
@ddt.data((10.0, None, 10.0))
|
|
||||||
@ddt.unpack
|
|
||||||
def test_lvm_max_over_subscription_ratio(self,
|
|
||||||
global_value,
|
|
||||||
lvm_value,
|
|
||||||
expected_value):
|
|
||||||
configuration = conf.Configuration(fake_opt, 'fake_group')
|
|
||||||
configuration.max_over_subscription_ratio = global_value
|
|
||||||
configuration.lvm_max_over_subscription_ratio = lvm_value
|
|
||||||
|
|
||||||
fake_vg = mock.Mock(fake_lvm.FakeBrickLVM('cinder-volumes', False,
|
|
||||||
None, 'default'))
|
|
||||||
lvm_driver = lvm.LVMVolumeDriver(configuration=configuration,
|
|
||||||
vg_obj=fake_vg, db=db)
|
|
||||||
|
|
||||||
self.assertEqual(expected_value,
|
|
||||||
lvm_driver.configuration.max_over_subscription_ratio)
|
|
||||||
|
|
||||||
|
|
||||||
class LVMISCSITestCase(test_driver.BaseDriverTestCase):
|
class LVMISCSITestCase(test_driver.BaseDriverTestCase):
|
||||||
"""Test Case for LVMISCSIDriver"""
|
"""Test Case for LVMISCSIDriver"""
|
||||||
|
@ -62,18 +62,6 @@ volume_opts = [
|
|||||||
'this setting is ignored if the specified file does '
|
'this setting is ignored if the specified file does '
|
||||||
'not exist (You can also specify \'None\' to not use '
|
'not exist (You can also specify \'None\' to not use '
|
||||||
'a conf file even if one exists).'),
|
'a conf file even if one exists).'),
|
||||||
cfg.FloatOpt('lvm_max_over_subscription_ratio',
|
|
||||||
# This option exists to provide a default value for the
|
|
||||||
# LVM driver which is different than the global default.
|
|
||||||
deprecated_for_removal=True,
|
|
||||||
deprecated_since="12.0.0",
|
|
||||||
deprecated_reason='Oversubscription ratio should now be '
|
|
||||||
'set using the common max_over_subscription'
|
|
||||||
'_ratio config option instead.',
|
|
||||||
default=None,
|
|
||||||
help='max_over_subscription_ratio setting for the LVM '
|
|
||||||
'driver. If set to None (the default), the general max_'
|
|
||||||
'over_subscription_ratio is used.'),
|
|
||||||
cfg.BoolOpt('lvm_suppress_fd_warnings',
|
cfg.BoolOpt('lvm_suppress_fd_warnings',
|
||||||
default=False,
|
default=False,
|
||||||
help='Suppress leaked file descriptor warnings in LVM '
|
help='Suppress leaked file descriptor warnings in LVM '
|
||||||
@ -122,10 +110,6 @@ class LVMVolumeDriver(driver.VolumeDriver):
|
|||||||
self.protocol = self.target_driver.protocol
|
self.protocol = self.target_driver.protocol
|
||||||
self._sparse_copy_volume = False
|
self._sparse_copy_volume = False
|
||||||
|
|
||||||
if self.configuration.lvm_max_over_subscription_ratio is not None:
|
|
||||||
self.configuration.max_over_subscription_ratio = \
|
|
||||||
self.configuration.lvm_max_over_subscription_ratio
|
|
||||||
|
|
||||||
def _sizestr(self, size_in_g):
|
def _sizestr(self, size_in_g):
|
||||||
return '%sg' % size_in_g
|
return '%sg' % size_in_g
|
||||||
|
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
The LVM driver specific `lvm_max_over_subscription_ratio` setting had been
|
||||||
|
deprecated and is now removed. Over subscription should now be managed
|
||||||
|
using the generic `max_over_subscription_ratio` setting.
|
Loading…
x
Reference in New Issue
Block a user