From 9d4922771383bdd24261cde95ce322d7e04d67f3 Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Wed, 27 Sep 2017 16:11:24 -0500 Subject: [PATCH] Stop overriding LVM overprovisioning ratio and deprecate The LVM driver has its own config option for managing overprovisioning separate from our common overprovisioning ratio. It default to 1, causing it to always override the common default. This changes the LVM default to None so it does not override the common setting and marks this config option as deprecated to be removed in Rocky. Change-Id: Ib90cdb1f60741284ea171d1a84ad74beac43c7d3 Closes-bug: #1720004 --- cinder/volume/drivers/lvm.py | 13 ++++++++----- .../lvm-thin-overprovision-1d279f66ee2252ff.yaml | 13 +++++++++++++ 2 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 releasenotes/notes/lvm-thin-overprovision-1d279f66ee2252ff.yaml diff --git a/cinder/volume/drivers/lvm.py b/cinder/volume/drivers/lvm.py index 48cc3a5db9b..b63aafe79ad 100644 --- a/cinder/volume/drivers/lvm.py +++ b/cinder/volume/drivers/lvm.py @@ -65,12 +65,15 @@ volume_opts = [ 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. - default=1.0, + 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. This takes precedence over the general ' - 'max_over_subscription_ratio by default. If set ' - 'to None, the general max_over_subscription_ratio ' - 'is used.'), + '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 ' diff --git a/releasenotes/notes/lvm-thin-overprovision-1d279f66ee2252ff.yaml b/releasenotes/notes/lvm-thin-overprovision-1d279f66ee2252ff.yaml new file mode 100644 index 00000000000..88f26987029 --- /dev/null +++ b/releasenotes/notes/lvm-thin-overprovision-1d279f66ee2252ff.yaml @@ -0,0 +1,13 @@ +--- +upgrade: + - | + The default value has been removed for the LVM specific + `lvm_max_over_subscription_ratio` setting. This changes the behavior so + that LVM backends now adhere to the common `max_over_subscription_ratio` + setting. The LVM specific config option may still be used, but it is + now deprecated and will be removed in a future release. +deprecations: + - | + The `lvm_max_overprovision_ratio` config option has been deprecated. It + will be removed in a future release. Configurations should move to using + the common `max_overprovision_ratio` config option.