Merge "Set default lvm_type to auto"

This commit is contained in:
Jenkins 2017-06-16 23:02:50 +00:00 committed by Gerrit Code Review
commit 241ac33a2b
3 changed files with 12 additions and 3 deletions

View File

@ -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,

View File

@ -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.'),

View File

@ -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.