diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e9b37b..76286a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ This file is used to list changes made in each version of the openstack-block-st * Add sysfsutils package for storwize/SVC driver * Add glance_ca_certificates_file * Add default_volume_type config option +* Update gpfs volume driver path and fix gpfs_images_share_mode initialization ## 10.0.0 * Upgrading to Juno diff --git a/README.md b/README.md index 820ce32..4816879 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ Cinder attributes - **cinder.volume.drivers.rbd.RBDDriver** - Ceph Block Device driver - **cinder.volume.drivers.netapp.nfs.NetAppDirect7modeNfsDriver** - NetApp NFS direct driver for 7-Mode storage controller - **cinder.volume.drivers.ibm.storwize_svc.StorwizeSVCDriver** - IBM Storwize/SVC driver - - **cinder.volume.drivers.gpfs.GPFSDriver** - IBM General Parallel File System driver + - **cinder.volume.drivers.ibm.gpfs.GPFSDriver** - IBM General Parallel File System driver - **cinder.volume.drivers.ibm.ibmnas.IBMNAS_NFSDriver** - IBM Storwize V7000 Unified and IBM SONAS Cinder driver - **cinder.volume.drivers.lvm.LVMISCSIDriver** - LVM Driver - **cinder.volume.drivers.emc.emc_smis_iscsi.EMCSMISISCSIDriver** - EMC SMI-S iSCSI Driver diff --git a/recipes/volume.rb b/recipes/volume.rb index 64f7970..8280032 100644 --- a/recipes/volume.rb +++ b/recipes/volume.rb @@ -125,7 +125,7 @@ when 'cinder.volume.drivers.ibm.storwize_svc.StorwizeSVCDriver' end end -when 'cinder.volume.drivers.gpfs.GPFSDriver' +when 'cinder.volume.drivers.ibm.gpfs.GPFSDriver' directory node['openstack']['block-storage']['gpfs']['gpfs_mount_point_base'] do mode '0755' owner node['openstack']['block-storage']['user'] diff --git a/spec/cinder_common_spec.rb b/spec/cinder_common_spec.rb index af1df39..a9e121a 100644 --- a/spec/cinder_common_spec.rb +++ b/spec/cinder_common_spec.rb @@ -706,10 +706,10 @@ describe 'openstack-block-storage::cinder-common' do context 'gpfs settings' do before do - node.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.gpfs.GPFSDriver' + node.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.ibm.gpfs.GPFSDriver' end - %w(gpfs_mount_point_base gpfs_images_share_mode gpfs_max_clone_depth + %w(gpfs_mount_point_base gpfs_max_clone_depth gpfs_sparse_volumes gpfs_storage_pool).each do |attr| it "has gpfs #{attr} set" do node.set['openstack']['block-storage']['gpfs'][attr] = "gpfs_#{attr}_value" @@ -720,11 +720,13 @@ describe 'openstack-block-storage::cinder-common' do it 'has no gpfs_images_dir line without the attribute' do node.set['openstack']['block-storage']['gpfs']['gpfs_images_dir'] = nil expect(chef_run).not_to render_file(file.name).with_content(/^gpfs_images_dir = /) + expect(chef_run).not_to render_file(file.name).with_content(/^gpfs_images_share_mode = /) end it 'has gpfs_images_dir line with attribute present' do node.set['openstack']['block-storage']['gpfs']['gpfs_images_dir'] = 'gpfs_images_dir_value' expect(chef_run).to render_file(file.name).with_content(/^gpfs_images_dir = gpfs_images_dir_value$/) + expect(chef_run).to render_file(file.name).with_content(/^gpfs_images_share_mode = copy_on_write$/) end it 'templates misc_cinder array correctly' do @@ -777,7 +779,7 @@ describe 'openstack-block-storage::cinder-common' do 'multi_vmware' => 'multi-vmware' }, 'gpfs' => { - 'volume_driver' => 'cinder.volume.drivers.gpfs.GPFSDriver', + 'volume_driver' => 'cinder.volume.drivers.ibm.gpfs.GPFSDriver', 'multi_gpfs' => 'multi-gpfs' } } @@ -828,7 +830,7 @@ describe 'openstack-block-storage::cinder-common' do expect(chef_run).to render_file(file.name).with_content(/^volume_driver = cinder\.volume\.drivers\.vmware\.vmdk\.VMwareVcVmdkDriver$/) expect(chef_run).to render_file(file.name).with_content(/^\[gpfs\]$/) - expect(chef_run).to render_file(file.name).with_content(/^volume_driver = cinder\.volume\.drivers\.gpfs\.GPFSDriver$/) + expect(chef_run).to render_file(file.name).with_content(/^volume_driver = cinder\.volume\.drivers\.ibm\.gpfs\.GPFSDriver$/) end it 'set lvm option' do diff --git a/spec/volume-redhat_spec.rb b/spec/volume-redhat_spec.rb index 7d3ce4a..3a52efc 100644 --- a/spec/volume-redhat_spec.rb +++ b/spec/volume-redhat_spec.rb @@ -113,7 +113,7 @@ describe 'openstack-block-storage::volume' do describe 'IBM GPFS volume driver' do before do @chef_run = ::ChefSpec::Runner.new ::REDHAT_OPTS do |n| - n.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.gpfs.GPFSDriver' + n.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.ibm.gpfs.GPFSDriver' n.set['openstack']['block-storage']['gpfs']['gpfs_mount_point_base'] = 'volumes' end @@ -126,17 +126,23 @@ describe 'openstack-block-storage::volume' do /^gpfs_mount_point_base = volumes$/) end - it 'verifies gpfs_images_dir' do + it 'verifies gpfs_images_dir and gpfs_images_share_mode is set with default value' do @chef_run.node.set['openstack']['block-storage']['gpfs']['gpfs_images_dir'] = 'images' expect(@chef_run).to render_file(@conf).with_content( /^gpfs_images_dir = images$/) - end - - it 'verifies gpfs_images_share_mode is default' do expect(@chef_run).to render_file(@conf).with_content( /^gpfs_images_share_mode = copy_on_write$/) end + it 'verifies gpfs_images_dir and gpfs_images_share_mode set correctly' do + @chef_run.node.set['openstack']['block-storage']['gpfs']['gpfs_images_dir'] = 'images' + @chef_run.node.set['openstack']['block-storage']['gpfs']['gpfs_images_share_mode'] = 'copy' + expect(@chef_run).to render_file(@conf).with_content( + /^gpfs_images_dir = images$/) + expect(@chef_run).to render_file(@conf).with_content( + /^gpfs_images_share_mode = copy$/) + end + it 'verifies gpfs_sparse_volumes is default' do expect(@chef_run).to render_file(@conf).with_content( /^gpfs_sparse_volumes = true$/) diff --git a/templates/default/cinder.conf.erb b/templates/default/cinder.conf.erb index 75d10cb..b131073 100644 --- a/templates/default/cinder.conf.erb +++ b/templates/default/cinder.conf.erb @@ -967,7 +967,7 @@ vmware_image_transfer_timeout_secs = <%= node['openstack']['block-storage']['vmw vmware_max_objects_retrieval = <%= node['openstack']['block-storage']['vmware']['vmware_max_objects_retrieval'] %> <% end %> -<% if @enabled_drivers.include?('cinder.volume.drivers.gpfs.GPFSDriver') %> +<% if @enabled_drivers.include?('cinder.volume.drivers.ibm.gpfs.GPFSDriver') %> ######## defined in cinder.openstack.volume.drivers.ibm.gpfs ######## # Specifies the path of the GPFS directory where Block Storage @@ -979,7 +979,6 @@ gpfs_mount_point_base = <%= node["openstack"]["block-storage"]["gpfs"]["gpfs_mou # Leave undefined if not storing images in GPFS. (string # value) gpfs_images_dir = <%= node['openstack']['block-storage']['gpfs']['gpfs_images_dir'] %> -<% end %> # Specifies the type of image copy to be used. Set this when # the Image service repository also uses GPFS so that image @@ -990,6 +989,7 @@ gpfs_images_dir = <%= node['openstack']['block-storage']['gpfs']['gpfs_images_di # strategy is used and unmodified blocks of the image file are # shared efficiently. (string value) gpfs_images_share_mode = <%= node['openstack']['block-storage']['gpfs']['gpfs_images_share_mode'] %> +<% end %> # Specifies an upper limit on the number of indirections # required to reach a specific block due to snapshots or