Browse Source

use LVMVolumeDriver as default.

LVMISCSIDriver is deprecated.
See also: cinder/volume/drivers/lvm.py

Change-Id: I08b157ee7fbb0d61c8c9ec406edf2240a9a40c1d
Closes-Bug: #1451363
tags/kilo-eol
Masaki Matsushita 4 years ago
parent
commit
0fd962dae2

+ 5
- 5
README.md View File

@@ -40,9 +40,9 @@ scheduler
40 40
 
41 41
 volume
42 42
 ----
43
-- Installs the cinder-volume service, sets up the iscsi helper and create volume group when using the LVMISCSIDriver
43
+- Installs the cinder-volume service, sets up the iscsi helper and create volume group when using the LVMVolumeDriver
44 44
 
45
-Defaults to the ISCSI (LVM) Driver.
45
+Defaults to the LVM Volume Driver.
46 46
 
47 47
 Attributes
48 48
 ==========
@@ -108,13 +108,13 @@ Cinder attributes
108 108
      - **cinder.volume.drivers.ibm.storwize_svc.StorwizeSVCDriver** -  IBM Storwize/SVC driver
109 109
      - **cinder.volume.drivers.ibm.gpfs.GPFSDriver** -  IBM General Parallel File System driver
110 110
      - **cinder.volume.drivers.ibm.ibmnas.IBMNAS_NFSDriver** - IBM Storwize V7000 Unified and IBM SONAS Cinder driver
111
-     - **cinder.volume.drivers.lvm.LVMISCSIDriver** - LVM Driver
111
+     - **cinder.volume.drivers.lvm.LVMVolumeDriver** - LVM Driver
112 112
      - **cinder.volume.drivers.emc.emc_smis_iscsi.EMCSMISISCSIDriver** - EMC SMI-S iSCSI Driver
113 113
 * `openstack["block-storage"]["volume"]["volume_clear"]` - Defines the method for clearing volumes on a volume delete possible options: 'zero', 'none', 'shred' (https://review.openstack.org/#/c/12521/)
114 114
 * `openstack["block-storage"]["volume"]["volume_clear_size"]` - size in MB used to limit the cleared area on deleting a volume, to the first part of the volume only. (default 0 = all MB)
115 115
 * `openstack["block-storage"]["volume"]["volume_group"]` - Name for the VG that will contain exported volumes
116 116
 * `openstack["block-storage"]["voluem"]["volume_group_size"]` - The size (GB) of volume group (default is 40)
117
-* `openstack["block-storage"]["voluem"]["create_volume_group"]` - Create volume group or not when using the LVMISCSIDriver (default is false)
117
+* `openstack["block-storage"]["voluem"]["create_volume_group"]` - Create volume group or not when using the LVMVolumeDriver (default is false)
118 118
 * `openstack["block-storage"]["volume"]["create_volume_group_type"]` - 'file' or 'block_devices'. Create volume group from block devices or just a file for testing
119 119
 * `openstack["block-storage"]["volume"]["block_devices"]` - String of blank separated block devices to use for creating volume group when type is 'block_devices'
120 120
 * `openstack["block-storage"]["volume"]["iscsi_helper"]` - ISCSI target user-land tool to use
@@ -202,7 +202,7 @@ Cinder attributes
202 202
 * `openstack['block-storage']['ibmnas']['ibmnas_platform_type']` - Platform type to be used as backend storage
203 203
 
204 204
 ### Multiple backends attributes ###
205
-* `openstack['block-storage']['volume']['multi_backend']` - Hash map to indicate multiple backends sections, e.g. { 'lvm1' => { 'volume_driver' => 'cinder.volume.drivers.lvm.LVMISCSIDriver', 'volume_backend_name' => 'lvm1' }, 'lvm2' => { 'volume_driver' => 'cinder.volume.drivers.lvm.LVMISCSIDriver', 'volume_backend_name' => 'lvm2' } }
205
+* `openstack['block-storage']['volume']['multi_backend']` - Hash map to indicate multiple backends sections, e.g. { 'lvm1' => { 'volume_driver' => 'cinder.volume.drivers.lvm.LVMVolumeDriver', 'volume_backend_name' => 'lvm1' }, 'lvm2' => { 'volume_driver' => 'cinder.volume.drivers.lvm.LVMVolumeDriver', 'volume_backend_name' => 'lvm2' } }
206 206
 * `default['openstack']['block-storage']['volume']['default_volume_type']` - String to indicate the volume_type that maps to one of the configured volume backends
207 207
 
208 208
 The following attributes are defined in attributes/default.rb of the common cookbook, but are documented here due to their relevance:

+ 1
- 1
attributes/default.rb View File

@@ -257,7 +257,7 @@ default['openstack']['block-storage']['cron']['audit_logfile'] = '/var/log/cinde
257 257
 
258 258
 default['openstack']['block-storage']['volume']['state_path'] = '/var/lib/cinder'
259 259
 default['openstack']['block-storage']['volume']['volumes_dir'] = '/var/lib/cinder/volumes'
260
-default['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMISCSIDriver'
260
+default['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMVolumeDriver'
261 261
 default['openstack']['block-storage']['volume']['volume_group'] = 'cinder-volumes'
262 262
 default['openstack']['block-storage']['volume']['volume_group_size'] = 40
263 263
 default['openstack']['block-storage']['volume']['volume_clear_size'] = 0

+ 1
- 1
recipes/volume.rb View File

@@ -169,7 +169,7 @@ when 'cinder.volume.drivers.ibm.ibmnas.IBMNAS_NFSDriver'
169 169
     notifies :restart, 'service[cinder-volume]'
170 170
   end
171 171
 
172
-when 'cinder.volume.drivers.lvm.LVMISCSIDriver'
172
+when 'cinder.volume.drivers.lvm.LVMVolumeDriver'
173 173
 
174 174
   platform_options['cinder_lvm_packages'].each do |pkg|
175 175
     package pkg do

+ 3
- 3
spec/cinder_common_spec.rb View File

@@ -437,7 +437,7 @@ describe 'openstack-block-storage::cinder-common' do
437 437
 
438 438
         context 'lvm settings' do
439 439
           before do
440
-            node.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMISCSIDriver'
440
+            node.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMVolumeDriver'
441 441
           end
442 442
 
443 443
           %w(group clear clear_size).each do |attr|
@@ -824,7 +824,7 @@ describe 'openstack-block-storage::cinder-common' do
824 824
           before do
825 825
             node.set['openstack']['block-storage']['volume']['multi_backend'] = {
826 826
               'lvm' => {
827
-                'volume_driver' => 'cinder.volume.drivers.lvm.LVMISCSIDriver',
827
+                'volume_driver' => 'cinder.volume.drivers.lvm.LVMVolumeDriver',
828 828
                 'volume_backend_name' => 'lvmdrv'
829 829
               },
830 830
               'rbd' => {
@@ -883,7 +883,7 @@ describe 'openstack-block-storage::cinder-common' do
883 883
             expect(chef_run).to render_file(file.name).with_content(/^enabled_backends = lvm,rbd,netapp_iscsi,netapp_nfs,ibmnas,ibmsvc,solidfire,emciscsi,vmware,gpfs$/)
884 884
 
885 885
             expect(chef_run).to render_file(file.name).with_content(/^\[lvm\]$/)
886
-            expect(chef_run).to render_file(file.name).with_content(/^volume_driver = cinder\.volume\.drivers\.lvm\.LVMISCSIDriver$/)
886
+            expect(chef_run).to render_file(file.name).with_content(/^volume_driver = cinder\.volume\.drivers\.lvm\.LVMVolumeDriver$/)
887 887
 
888 888
             expect(chef_run).to render_file(file.name).with_content(/^\[rbd\]$/)
889 889
             expect(chef_run).to render_file(file.name).with_content(/^volume_driver = cinder\.volume\.drivers\.rbd\.RBDDriver$/)

+ 1
- 1
spec/volume-redhat_spec.rb View File

@@ -165,7 +165,7 @@ describe 'openstack-block-storage::volume' do
165 165
     describe 'create_vg' do
166 166
       let(:file) { chef_run.template('/etc/init.d/cinder-group-active') }
167 167
       before do
168
-        node.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMISCSIDriver'
168
+        node.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMVolumeDriver'
169 169
         node.set['openstack']['block-storage']['volume']['create_volume_group'] = true
170 170
         stub_command('vgs cinder-volumes').and_return(false)
171 171
       end

+ 2
- 2
spec/volume_spec.rb View File

@@ -238,7 +238,7 @@ describe 'openstack-block-storage::volume' do
238 238
     describe 'create_vg' do
239 239
       let(:file) { chef_run.template('/etc/init.d/cinder-group-active') }
240 240
       before do
241
-        node.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMISCSIDriver'
241
+        node.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMVolumeDriver'
242 242
         node.set['openstack']['block-storage']['volume']['create_volume_group'] = true
243 243
         stub_command('vgs cinder-volumes').and_return(false)
244 244
       end
@@ -295,7 +295,7 @@ describe 'openstack-block-storage::volume' do
295 295
 
296 296
     describe 'create vg on block devices' do
297 297
       before do
298
-        node.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMISCSIDriver'
298
+        node.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMVolumeDriver'
299 299
         node.set['openstack']['block-storage']['volume']['create_volume_group'] = true
300 300
         node.set['openstack']['block-storage']['volume']['create_volume_group_type'] = 'block_devices'
301 301
         node.set['openstack']['block-storage']['volume']['block_devices'] = '/dev/sdx /dev/sdx1'

+ 1
- 1
templates/default/cinder.conf.erb View File

@@ -420,7 +420,7 @@ max_gigabytes=<%= node["openstack"]["block-storage"]["max_gigabytes"] %>
420 420
 
421 421
 
422 422
 ######## defined in cinder.volume.driver ########
423
-<% if @enabled_drivers.include?("cinder.volume.drivers.lvm.LVMISCSIDriver") %>
423
+<% if @enabled_drivers.include?("cinder.volume.drivers.lvm.LVMVolumeDriver") %>
424 424
 volume_group=<%= node["openstack"]["block-storage"]["volume"]["volume_group"] %>
425 425
 #### (StrOpt) Name for the VG that will contain exported volumes
426 426
 volume_clear=<%= node["openstack"]["block-storage"]["volume"]["volume_clear"] %>

Loading…
Cancel
Save