Set default lvm_type to auto
We've had an lvm_type=thin for quite some time, and we've wanted to make it Cinders default for a while, but there's no clean way to migrate on upgrades. So, we have a compromise, detect if the deployment has volumes (including the thin pool). If there are no LVs or if the thin pool exists, use thin. Otherwise, use the old thick lvm-default. This patch makes the default setting "auto" instead of "default" (which is actually thick). DocImpact: Need to update docs to reflect the default setting for new deployments is auto (thin) Change-Id: If25e814eb6282fef9a1dd30d17c80eab6860e275
This commit is contained in:
parent
9769c6c463
commit
8c57c6d3ee
@ -98,11 +98,13 @@ class LVMVolumeDriverTestCase(test_driver.BaseDriverTestCase):
|
||||
|
||||
@mock.patch.object(volutils, 'get_all_volume_groups',
|
||||
return_value=[{'name': 'cinder-volumes'}])
|
||||
def test_check_for_setup_error(self, vgs):
|
||||
@mock.patch('cinder.brick.local_dev.lvm.LVM.get_lvm_version',
|
||||
return_value=(2, 2, 100))
|
||||
def test_check_for_setup_error(self, _mock_get_version, vgs):
|
||||
vg_obj = fake_lvm.FakeBrickLVM('cinder-volumes',
|
||||
False,
|
||||
None,
|
||||
'default')
|
||||
'auto')
|
||||
|
||||
configuration = conf.Configuration(fake_opt, 'fake_group')
|
||||
lvm_driver = lvm.LVMVolumeDriver(configuration=configuration,
|
||||
|
@ -51,7 +51,7 @@ volume_opts = [
|
||||
help='If >0, create LVs with multiple mirrors. Note that '
|
||||
'this requires lvm_mirrors + 2 PVs with available space'),
|
||||
cfg.StrOpt('lvm_type',
|
||||
default='default',
|
||||
default='auto',
|
||||
choices=['default', 'thin', 'auto'],
|
||||
help='Type of LVM volumes to deploy; (default, thin, or auto). '
|
||||
'Auto defaults to thin if thin is supported.'),
|
||||
|
@ -0,0 +1,7 @@
|
||||
---
|
||||
other:
|
||||
- |
|
||||
Modify default lvm_type setting from thick to auto. This will result in
|
||||
Cinder preferring thin on init, if there are no LV's in the VG it will
|
||||
create a thin-pool and use thin. If there are LV's and no thin-pool
|
||||
it will continue using thick.
|
Loading…
Reference in New Issue
Block a user