summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-16 23:02:50 +0000
committerGerrit Code Review <review@openstack.org>2017-06-16 23:02:50 +0000
commit241ac33a2be712e0d4f06573382ddcc5e32d1712 (patch)
tree85446603b6c06522fa12023d0c8fc9e54209db4a
parentffa89ee16178dbc602765685a141516e5e32a883 (diff)
parent8c57c6d3ee32c6ad3db7f4936412aa4773ff5ada (diff)
Merge "Set default lvm_type to auto"
-rw-r--r--cinder/tests/unit/volume/drivers/test_lvm_driver.py6
-rw-r--r--cinder/volume/drivers/lvm.py2
-rw-r--r--releasenotes/notes/lvm-type-default-to-auto-a2ad554fc8bb25f2.yaml7
3 files changed, 12 insertions, 3 deletions
diff --git a/cinder/tests/unit/volume/drivers/test_lvm_driver.py b/cinder/tests/unit/volume/drivers/test_lvm_driver.py
index bbbf1be..a86d6e6 100644
--- a/cinder/tests/unit/volume/drivers/test_lvm_driver.py
+++ b/cinder/tests/unit/volume/drivers/test_lvm_driver.py
@@ -98,11 +98,13 @@ class LVMVolumeDriverTestCase(test_driver.BaseDriverTestCase):
98 98
99 @mock.patch.object(volutils, 'get_all_volume_groups', 99 @mock.patch.object(volutils, 'get_all_volume_groups',
100 return_value=[{'name': 'cinder-volumes'}]) 100 return_value=[{'name': 'cinder-volumes'}])
101 def test_check_for_setup_error(self, vgs): 101 @mock.patch('cinder.brick.local_dev.lvm.LVM.get_lvm_version',
102 return_value=(2, 2, 100))
103 def test_check_for_setup_error(self, _mock_get_version, vgs):
102 vg_obj = fake_lvm.FakeBrickLVM('cinder-volumes', 104 vg_obj = fake_lvm.FakeBrickLVM('cinder-volumes',
103 False, 105 False,
104 None, 106 None,
105 'default') 107 'auto')
106 108
107 configuration = conf.Configuration(fake_opt, 'fake_group') 109 configuration = conf.Configuration(fake_opt, 'fake_group')
108 lvm_driver = lvm.LVMVolumeDriver(configuration=configuration, 110 lvm_driver = lvm.LVMVolumeDriver(configuration=configuration,
diff --git a/cinder/volume/drivers/lvm.py b/cinder/volume/drivers/lvm.py
index d8d7e9f..4f88ec0 100644
--- a/cinder/volume/drivers/lvm.py
+++ b/cinder/volume/drivers/lvm.py
@@ -51,7 +51,7 @@ volume_opts = [
51 help='If >0, create LVs with multiple mirrors. Note that ' 51 help='If >0, create LVs with multiple mirrors. Note that '
52 'this requires lvm_mirrors + 2 PVs with available space'), 52 'this requires lvm_mirrors + 2 PVs with available space'),
53 cfg.StrOpt('lvm_type', 53 cfg.StrOpt('lvm_type',
54 default='default', 54 default='auto',
55 choices=['default', 'thin', 'auto'], 55 choices=['default', 'thin', 'auto'],
56 help='Type of LVM volumes to deploy; (default, thin, or auto). ' 56 help='Type of LVM volumes to deploy; (default, thin, or auto). '
57 'Auto defaults to thin if thin is supported.'), 57 'Auto defaults to thin if thin is supported.'),
diff --git a/releasenotes/notes/lvm-type-default-to-auto-a2ad554fc8bb25f2.yaml b/releasenotes/notes/lvm-type-default-to-auto-a2ad554fc8bb25f2.yaml
new file mode 100644
index 0000000..130b9db
--- /dev/null
+++ b/releasenotes/notes/lvm-type-default-to-auto-a2ad554fc8bb25f2.yaml
@@ -0,0 +1,7 @@
1---
2other:
3 - |
4 Modify default lvm_type setting from thick to auto. This will result in
5 Cinder preferring thin on init, if there are no LV's in the VG it will
6 create a thin-pool and use thin. If there are LV's and no thin-pool
7 it will continue using thick.