diff --git a/cinder/tests/unit/volume/drivers/test_lvm_driver.py b/cinder/tests/unit/volume/drivers/test_lvm_driver.py index 58701a57837..884af0103f7 100644 --- a/cinder/tests/unit/volume/drivers/test_lvm_driver.py +++ b/cinder/tests/unit/volume/drivers/test_lvm_driver.py @@ -849,26 +849,6 @@ class LVMVolumeDriverTestCase(test_driver.BaseDriverTestCase): 'extra_info': None}] 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): """Test Case for LVMISCSIDriver""" diff --git a/cinder/volume/drivers/lvm.py b/cinder/volume/drivers/lvm.py index 6e02d03f360..e8c21ec7acc 100644 --- a/cinder/volume/drivers/lvm.py +++ b/cinder/volume/drivers/lvm.py @@ -62,18 +62,6 @@ volume_opts = [ 'this setting is ignored if the specified file does ' 'not exist (You can also specify \'None\' to not use ' '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', default=False, help='Suppress leaked file descriptor warnings in LVM ' @@ -122,10 +110,6 @@ class LVMVolumeDriver(driver.VolumeDriver): self.protocol = self.target_driver.protocol 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): return '%sg' % size_in_g diff --git a/releasenotes/notes/remove-lvm-over-sub-3c8addbf47827045.yaml b/releasenotes/notes/remove-lvm-over-sub-3c8addbf47827045.yaml new file mode 100644 index 00000000000..475e09eb46c --- /dev/null +++ b/releasenotes/notes/remove-lvm-over-sub-3c8addbf47827045.yaml @@ -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.