Browse Source

Merge "use LVMVolumeDriver as default. LVMISCSIDriver is deprecated. See also: cinder/volume/drivers/lvm.py"

Jenkins 4 years ago
parent
commit
b4ae9f3dec

+ 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

@@ -260,7 +260,7 @@ default['openstack']['block-storage']['cron']['audit_logfile'] = '/var/log/cinde
260 260
 
261 261
 default['openstack']['block-storage']['volume']['state_path'] = '/var/lib/cinder'
262 262
 default['openstack']['block-storage']['volume']['volumes_dir'] = '/var/lib/cinder/volumes'
263
-default['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMISCSIDriver'
263
+default['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMVolumeDriver'
264 264
 default['openstack']['block-storage']['volume']['volume_group'] = 'cinder-volumes'
265 265
 default['openstack']['block-storage']['volume']['volume_group_size'] = 40
266 266
 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

@@ -481,7 +481,7 @@ describe 'openstack-block-storage::cinder-common' do
481 481
 
482 482
         context 'lvm settings' do
483 483
           before do
484
-            node.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMISCSIDriver'
484
+            node.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMVolumeDriver'
485 485
           end
486 486
 
487 487
           %w(group clear clear_size).each do |attr|
@@ -868,7 +868,7 @@ describe 'openstack-block-storage::cinder-common' do
868 868
           before do
869 869
             node.set['openstack']['block-storage']['volume']['multi_backend'] = {
870 870
               'lvm' => {
871
-                'volume_driver' => 'cinder.volume.drivers.lvm.LVMISCSIDriver',
871
+                'volume_driver' => 'cinder.volume.drivers.lvm.LVMVolumeDriver',
872 872
                 'volume_backend_name' => 'lvmdrv'
873 873
               },
874 874
               'rbd' => {
@@ -927,7 +927,7 @@ describe 'openstack-block-storage::cinder-common' do
927 927
             expect(chef_run).to render_file(file.name).with_content(/^enabled_backends = lvm,rbd,netapp_iscsi,netapp_nfs,ibmnas,ibmsvc,solidfire,emciscsi,vmware,gpfs$/)
928 928
 
929 929
             expect(chef_run).to render_file(file.name).with_content(/^\[lvm\]$/)
930
-            expect(chef_run).to render_file(file.name).with_content(/^volume_driver = cinder\.volume\.drivers\.lvm\.LVMISCSIDriver$/)
930
+            expect(chef_run).to render_file(file.name).with_content(/^volume_driver = cinder\.volume\.drivers\.lvm\.LVMVolumeDriver$/)
931 931
 
932 932
             expect(chef_run).to render_file(file.name).with_content(/^\[rbd\]$/)
933 933
             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

@@ -495,7 +495,7 @@ max_gigabytes=<%= node["openstack"]["block-storage"]["max_gigabytes"] %>
495 495
 
496 496
 
497 497
 ######## defined in cinder.volume.driver ########
498
-<% if @enabled_drivers.include?("cinder.volume.drivers.lvm.LVMISCSIDriver") %>
498
+<% if @enabled_drivers.include?("cinder.volume.drivers.lvm.LVMVolumeDriver") %>
499 499
 volume_group=<%= node["openstack"]["block-storage"]["volume"]["volume_group"] %>
500 500
 #### (StrOpt) Name for the VG that will contain exported volumes
501 501
 volume_clear=<%= node["openstack"]["block-storage"]["volume"]["volume_clear"] %>

Loading…
Cancel
Save