From b888256cf082c735c2cb091e619cacbff890b53e Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Wed, 16 Dec 2015 14:14:04 -0700 Subject: [PATCH] Add additional backend options for cinder The following change adds the ability to configure the following options for backends and volumes: For dellsc_iscsi: + dell_sc_verify_cert For glusterfs: + glusterfs_backup_mount_point + glusterfs_backup_share For nfs: + nfs_mount_attempts For rbd: + rados_connect_timeout + rados_connection_interval + rados_connection_retries + rbd_store_chunk_size For glusterfs we are also removing the deprecated glusterfs_disk_util which was removed in Icehouse. Change-Id: I08dd7dbc9ad51d40a64a25119ca8692c068ca80c --- manifests/backend/dellsc_iscsi.pp | 6 +++ manifests/backend/glusterfs.pp | 29 ++++++++------ manifests/backend/nfs.pp | 8 ++++ manifests/backend/rbd.pp | 26 +++++++++++++ manifests/volume/dellsc_iscsi.pp | 6 +++ manifests/volume/glusterfs.pp | 38 +++++++++++-------- manifests/volume/nfs.pp | 8 ++++ manifests/volume/rbd.pp | 26 +++++++++++++ .../cinder_volume_dellsc_iscsi_spec.rb | 1 + spec/classes/cinder_volume_glusterfs_spec.rb | 11 +----- spec/classes/cinder_volume_nfs_spec.rb | 5 ++- spec/classes/cinder_volume_rbd_spec.rb | 8 ++++ .../cinder_backend_dellsc_iscsi_spec.rb | 1 + spec/defines/cinder_backend_glusterfs_spec.rb | 13 ++----- spec/defines/cinder_backend_nfs_spec.rb | 3 ++ spec/defines/cinder_backend_rbd_spec.rb | 8 ++++ 16 files changed, 150 insertions(+), 47 deletions(-) diff --git a/manifests/backend/dellsc_iscsi.pp b/manifests/backend/dellsc_iscsi.pp index 9d79b971..fc938378 100644 --- a/manifests/backend/dellsc_iscsi.pp +++ b/manifests/backend/dellsc_iscsi.pp @@ -31,6 +31,10 @@ # (optional) Name of the server folder to use on the Storage Center. # Defaults to 'srv' # +# [*dell_sc_verify_cert*] +# (optional) Enable HTTPS SC ceritifcate verification +# Defaults to $::os_service_default +# # [*dell_sc_volume_folder*] # (optional) Name of the volume folder to use on the Storage Center. # Defaults to 'vol' @@ -54,6 +58,7 @@ define cinder::backend::dellsc_iscsi ( $volume_backend_name = $name, $dell_sc_api_port = $::os_service_default, $dell_sc_server_folder = 'srv', + $dell_sc_verify_cert = $::os_service_default, $dell_sc_volume_folder = 'vol', $iscsi_port = $::os_service_default, $extra_options = {}, @@ -78,6 +83,7 @@ define cinder::backend::dellsc_iscsi ( "${name}/dell_sc_ssn": value => $dell_sc_ssn; "${name}/dell_sc_api_port": value => $dell_sc_api_port; "${name}/dell_sc_server_folder": value => $dell_sc_server_folder; + "${name}/dell_sc_verify_cert": value => $dell_sc_verify_cert; "${name}/dell_sc_volume_folder": value => $dell_sc_volume_folder; "${name}/iscsi_port": value => $iscsi_port; } diff --git a/manifests/backend/glusterfs.pp b/manifests/backend/glusterfs.pp index 1f14e6e2..f03081ee 100644 --- a/manifests/backend/glusterfs.pp +++ b/manifests/backend/glusterfs.pp @@ -13,8 +13,14 @@ # (optional) Allows for the volume_backend_name to be separate of $name. # Defaults to: $name # -# [*glusterfs_disk_util*] -# Removed in Icehouse. +# [*glusterfs_backup_mount_point*] +# (optional) Base dir containing mount point for gluster share. +# Defaults to $::os_service_default +# +# [*glusterfs_backup_share*] +# (optonal) GlusterFS share in : +# format. Eg: 1.2.3.4:backup_vol +# Defaults to $::os_service_default # # [*glusterfs_sparsed_volumes*] # (optional) Whether or not to use sparse (thin) volumes. @@ -43,18 +49,15 @@ # define cinder::backend::glusterfs ( $glusterfs_shares, - $volume_backend_name = $name, - $glusterfs_disk_util = false, - $glusterfs_sparsed_volumes = $::os_service_default, - $glusterfs_mount_point_base = $::os_service_default, - $glusterfs_shares_config = '/etc/cinder/shares.conf', - $extra_options = {}, + $volume_backend_name = $name, + $glusterfs_backup_mount_point = $::os_service_default, + $glusterfs_backup_share = $::os_service_default, + $glusterfs_sparsed_volumes = $::os_service_default, + $glusterfs_mount_point_base = $::os_service_default, + $glusterfs_shares_config = '/etc/cinder/shares.conf', + $extra_options = {}, ) { - if $glusterfs_disk_util { - fail('glusterfs_disk_util is removed in Icehouse.') - } - $content = join($glusterfs_shares, "\n") file { $glusterfs_shares_config: @@ -67,6 +70,8 @@ define cinder::backend::glusterfs ( "${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_driver": value => 'cinder.volume.drivers.glusterfs.GlusterfsDriver'; + "${name}/glusterfs_backup_mount_point": value => $glusterfs_backup_mount_point; + "${name}/glusterfs_backup_share": value => $glusterfs_backup_share; "${name}/glusterfs_shares_config": value => $glusterfs_shares_config; "${name}/glusterfs_sparsed_volumes": value => $glusterfs_sparsed_volumes; "${name}/glusterfs_mount_point_base": value => $glusterfs_mount_point_base; diff --git a/manifests/backend/nfs.pp b/manifests/backend/nfs.pp index df65ca0e..3921fde6 100644 --- a/manifests/backend/nfs.pp +++ b/manifests/backend/nfs.pp @@ -10,6 +10,12 @@ # (Required) Description # Defaults to '[]' # +# [*nfs_mount_attempts*] +# (optional) The number of attempts to mount nfs shares before raising an +# error. At least one attempt will be made to mount an nfs share, regardless +# of the value specified. +# Defaults to $::os_service_default +# # [*nfs_mount_options*] # (Optional) Mount options passed to the nfs client. # Defaults to $::os_service_default @@ -52,6 +58,7 @@ define cinder::backend::nfs ( $volume_backend_name = $name, $nfs_servers = [], + $nfs_mount_attempts = $::os_service_default, $nfs_mount_options = $::os_service_default, $nfs_disk_util = $::os_service_default, $nfs_sparsed_volumes = $::os_service_default, @@ -73,6 +80,7 @@ define cinder::backend::nfs ( "${name}/volume_driver": value => 'cinder.volume.drivers.nfs.NfsDriver'; "${name}/nfs_shares_config": value => $nfs_shares_config; + "${name}/nfs_mount_attempts": value => $nfs_mount_attempts; "${name}/nfs_mount_options": value => $nfs_mount_options; "${name}/nfs_disk_util": value => $nfs_disk_util; "${name}/nfs_sparsed_volumes": value => $nfs_sparsed_volumes; diff --git a/manifests/backend/rbd.pp b/manifests/backend/rbd.pp index 0d2eebda..949ae637 100644 --- a/manifests/backend/rbd.pp +++ b/manifests/backend/rbd.pp @@ -44,6 +44,24 @@ # A value of zero disables cloning # Defaults to $::os_service_default # +# [*rados_connect_timeout*] +# (optional) Timeout value (in seconds) used when connecting to ceph cluster. +# If value < 0, no timeout is set and default librados value is used. +# Defaults to $::os_service_default +# +# [*rados_connection_interval*] +# (optional) Interval value (in seconds) between connection retries to ceph +# cluster. +# Defaults to $::os_service_default +# +# [*rados_connection_retries*] +# (optional) Number of retries if connection to ceph cluster failed. +# Defaults to $::os_service_default +# +# [*rbd_store_chunk_size*] +# (optional) Volumes will be chunked into objects of this size (in megabytes). +# Defaults to $::os_service_default +# # [*extra_options*] # (optional) Hash of extra options to pass to the backend stanza # Defaults to: {} @@ -60,6 +78,10 @@ define cinder::backend::rbd ( $rbd_secret_uuid = $::os_service_default, $volume_tmp_dir = $::os_service_default, $rbd_max_clone_depth = $::os_service_default, + $rados_connect_timeout = $::os_service_default, + $rados_connection_interval = $::os_service_default, + $rados_connection_retries = $::os_service_default, + $rbd_store_chunk_size = $::os_service_default, $extra_options = {}, ) { @@ -74,6 +96,10 @@ define cinder::backend::rbd ( "${name}/rbd_max_clone_depth": value => $rbd_max_clone_depth; "${name}/rbd_flatten_volume_from_snapshot": value => $rbd_flatten_volume_from_snapshot; "${name}/rbd_secret_uuid": value => $rbd_secret_uuid; + "${name}/rados_connect_timeout": value => $rados_connect_timeout; + "${name}/rados_connection_interval": value => $rados_connection_interval; + "${name}/rados_connection_retries": value => $rados_connection_retries; + "${name}/rbd_store_chunk_size": value => $rbd_store_chunk_size; "${name}/volume_tmp_dir": value => $volume_tmp_dir; } diff --git a/manifests/volume/dellsc_iscsi.pp b/manifests/volume/dellsc_iscsi.pp index 4334430e..e470f956 100644 --- a/manifests/volume/dellsc_iscsi.pp +++ b/manifests/volume/dellsc_iscsi.pp @@ -27,6 +27,10 @@ # (optional) Name of the server folder to use on the Storage Center. # Defaults to 'srv' # +# [*dell_sc_verify_cert*] +# (optional) Enable HTTPS SC certificate verification +# Defaults to $:os_service_default +# # [*dell_sc_volume_folder*] # (optional) Name of the volume folder to use on the Storage Center. # Defaults to 'vol' @@ -49,6 +53,7 @@ class cinder::volume::dellsc_iscsi ( $dell_sc_ssn, $dell_sc_api_port = $::os_service_default, $dell_sc_server_folder = 'srv', + $dell_sc_verify_cert = $::os_service_default, $dell_sc_volume_folder = 'vol', $iscsi_port = $::os_service_default, $extra_options = {}, @@ -61,6 +66,7 @@ class cinder::volume::dellsc_iscsi ( dell_sc_ssn => $dell_sc_ssn, dell_sc_api_port => $dell_sc_api_port, dell_sc_server_folder => $dell_sc_server_folder, + dell_sc_verify_cert => $dell_sc_verify_cert, dell_sc_volume_folder => $dell_sc_volume_folder, iscsi_port => $iscsi_port, extra_options => $extra_options, diff --git a/manifests/volume/glusterfs.pp b/manifests/volume/glusterfs.pp index 45d7494f..c763a466 100644 --- a/manifests/volume/glusterfs.pp +++ b/manifests/volume/glusterfs.pp @@ -9,6 +9,15 @@ # (required) An array of GlusterFS volume locations. # Must be an array even if there is only one volume. # +# [*glusterfs_backup_mount_point*] +# (optional) Base dir containing mount point for gluster share. +# Defaults to $::os_service_default +# +# [*glusterfs_backup_share*] +# (optonal) GlusterFS share in : +# format. Eg: 1.2.3.4:backup_vol +# Defaults to $::os_service_default +# # [*glusterfs_sparsed_volumes*] # (optional) Whether or not to use sparse (thin) volumes. # Defaults to $::os_service_default which uses the driver's default of "true". @@ -27,11 +36,6 @@ # Example : # { 'glusterfs_backend/param1' => { 'value' => value1 } } # -# *Deprecated* -# -# [*glusterfs_disk_util*] -# Removed in Icehouse. -# # === Examples # # class { 'cinder::volume::glusterfs': @@ -40,19 +44,21 @@ # class cinder::volume::glusterfs ( $glusterfs_shares, - $glusterfs_disk_util = false, - $glusterfs_sparsed_volumes = $::os_service_default, - $glusterfs_mount_point_base = $::os_service_default, - $glusterfs_shares_config = '/etc/cinder/shares.conf', - $extra_options = {}, + $glusterfs_backup_mount_point = $::os_service_default, + $glusterfs_backup_share = $::os_service_default, + $glusterfs_sparsed_volumes = $::os_service_default, + $glusterfs_mount_point_base = $::os_service_default, + $glusterfs_shares_config = '/etc/cinder/shares.conf', + $extra_options = {}, ) { cinder::backend::glusterfs { 'DEFAULT': - glusterfs_shares => $glusterfs_shares, - glusterfs_disk_util => $glusterfs_disk_util, - glusterfs_sparsed_volumes => $glusterfs_sparsed_volumes, - glusterfs_mount_point_base => $glusterfs_mount_point_base, - glusterfs_shares_config => $glusterfs_shares_config, - extra_options => $extra_options, + glusterfs_shares => $glusterfs_shares, + glusterfs_backup_mount_point => $glusterfs_backup_mount_point, + glusterfs_backup_share => $glusterfs_backup_share, + glusterfs_sparsed_volumes => $glusterfs_sparsed_volumes, + glusterfs_mount_point_base => $glusterfs_mount_point_base, + glusterfs_shares_config => $glusterfs_shares_config, + extra_options => $extra_options, } } diff --git a/manifests/volume/nfs.pp b/manifests/volume/nfs.pp index 48dbd327..63889a6f 100644 --- a/manifests/volume/nfs.pp +++ b/manifests/volume/nfs.pp @@ -7,6 +7,12 @@ # (Required) Description # Defaults to '[]' # +# [*nfs_mount_attempts*] +# (optional) The number of attempts to mount nfs shares before raising an +# error. At least one attempt will be made to mount an nfs share, regardless +# of the value specified. +# Defaults to $::os_service_default +# # [*nfs_mount_options*] # (Optional) Mount options passed to the nfs client. # Defaults to $::os_service_default. @@ -48,6 +54,7 @@ # class cinder::volume::nfs ( $nfs_servers = [], + $nfs_mount_attempts = $::os_service_default, $nfs_mount_options = $::os_service_default, $nfs_disk_util = $::os_service_default, $nfs_sparsed_volumes = $::os_service_default, @@ -60,6 +67,7 @@ class cinder::volume::nfs ( cinder::backend::nfs { 'DEFAULT': nfs_servers => $nfs_servers, + nfs_mount_attempts => $nfs_mount_attempts, nfs_mount_options => $nfs_mount_options, nfs_disk_util => $nfs_disk_util, nfs_sparsed_volumes => $nfs_sparsed_volumes, diff --git a/manifests/volume/rbd.pp b/manifests/volume/rbd.pp index 541f0e3e..9a18d816 100644 --- a/manifests/volume/rbd.pp +++ b/manifests/volume/rbd.pp @@ -33,6 +33,24 @@ # A value of zero disables cloning # Defaults to $::os_service_default # +# [*rados_connect_timeout*] +# (optional) Timeout value (in seconds) used when connecting to ceph cluster. +# If value < 0, no timeout is set and default librados value is used. +# Defaults to $::os_service_default +# +# [*rados_connection_interval*] +# (optional) Interval value (in seconds) between connection retries to ceph +# cluster. +# Defaults to $::os_service_default +# +# [*rados_connection_retries*] +# (optional) Number of retries if connection to ceph cluster failed. +# Defaults to $::os_service_default +# +# [*rbd_store_chunk_size*] +# (optional) Volumes will be chunked into objects of this size (in megabytes). +# Defaults to $::os_service_default +# # [*extra_options*] # (optional) Hash of extra options to pass to the backend stanza # Defaults to: {} @@ -47,6 +65,10 @@ class cinder::volume::rbd ( $rbd_secret_uuid = false, $volume_tmp_dir = false, $rbd_max_clone_depth = $::os_service_default, + $rados_connect_timeout = $::os_service_default, + $rados_connection_interval = $::os_service_default, + $rados_connection_retries = $::os_service_default, + $rbd_store_chunk_size = $::os_service_default, $extra_options = {}, ) { @@ -58,6 +80,10 @@ class cinder::volume::rbd ( rbd_secret_uuid => $rbd_secret_uuid, volume_tmp_dir => $volume_tmp_dir, rbd_max_clone_depth => $rbd_max_clone_depth, + rados_connect_timeout => $rados_connect_timeout, + rados_connection_interval => $rados_connection_interval, + rados_connection_retries => $rados_connection_retries, + rbd_store_chunk_size => $rbd_store_chunk_size, extra_options => $extra_options, } } diff --git a/spec/classes/cinder_volume_dellsc_iscsi_spec.rb b/spec/classes/cinder_volume_dellsc_iscsi_spec.rb index 5b05472d..93f4f1ba 100644 --- a/spec/classes/cinder_volume_dellsc_iscsi_spec.rb +++ b/spec/classes/cinder_volume_dellsc_iscsi_spec.rb @@ -16,6 +16,7 @@ describe 'cinder::volume::dellsc_iscsi' do { :dell_sc_api_port => '', :dell_sc_server_folder => 'srv', + :dell_sc_verify_cert => '', :dell_sc_volume_folder => 'vol', :iscsi_port => '', } diff --git a/spec/classes/cinder_volume_glusterfs_spec.rb b/spec/classes/cinder_volume_glusterfs_spec.rb index 914c1e91..32516a06 100644 --- a/spec/classes/cinder_volume_glusterfs_spec.rb +++ b/spec/classes/cinder_volume_glusterfs_spec.rb @@ -17,6 +17,8 @@ describe 'cinder::volume::glusterfs' do is_expected.to contain_cinder_config('DEFAULT/glusterfs_shares_config').with_value('/etc/cinder/other_shares.conf') is_expected.to contain_cinder_config('DEFAULT/glusterfs_sparsed_volumes').with_value(true) is_expected.to contain_cinder_config('DEFAULT/glusterfs_mount_point_base').with_value('/cinder_mount_point') + is_expected.to contain_cinder_config('DEFAULT/glusterfs_backup_mount_point').with_value('') + is_expected.to contain_cinder_config('DEFAULT/glusterfs_backup_share').with_value('') is_expected.to contain_file('/etc/cinder/other_shares.conf').with( :content => "10.10.10.10:/volumes\n10.10.10.11:/volumes\n", :require => 'Package[cinder]', @@ -24,15 +26,6 @@ describe 'cinder::volume::glusterfs' do ) end - context "with an parameter which has been removed" do - before do - params.merge!({ - :glusterfs_disk_util => 'foo', - }) - end - it_raises 'a Puppet::Error', /glusterfs_disk_util is removed in Icehouse./ - end - context 'glusterfs volume driver with additional configuration' do before do params.merge!({:extra_options => {'glusterfs_backend/param1' => { 'value' => 'value1' }}}) diff --git a/spec/classes/cinder_volume_nfs_spec.rb b/spec/classes/cinder_volume_nfs_spec.rb index 6ee36a0c..ec8319c2 100644 --- a/spec/classes/cinder_volume_nfs_spec.rb +++ b/spec/classes/cinder_volume_nfs_spec.rb @@ -47,11 +47,14 @@ describe 'cinder::volume::nfs' do describe 'nfs volume driver with additional configuration' do before :each do - params.merge!({:extra_options => {'nfs_backend/param1' => {'value' => 'value1'}}}) + params.merge!({ + :nfs_mount_attempts => 4, + :extra_options => {'nfs_backend/param1' => {'value' => 'value1'}}}) end it 'configure nfs volume with additional configuration' do is_expected.to contain_cinder__backend__nfs('DEFAULT').with({ + :nfs_mount_attempts => params[:nfs_mount_attempts], :extra_options => {'nfs_backend/param1' => {'value' => 'value1'}} }) end diff --git a/spec/classes/cinder_volume_rbd_spec.rb b/spec/classes/cinder_volume_rbd_spec.rb index d7d02a80..37a2617f 100644 --- a/spec/classes/cinder_volume_rbd_spec.rb +++ b/spec/classes/cinder_volume_rbd_spec.rb @@ -10,6 +10,10 @@ describe 'cinder::volume::rbd' do :rbd_flatten_volume_from_snapshot => true, :volume_tmp_dir => '', :rbd_max_clone_depth => '0', + :rados_connect_timeout => '', + :rados_connection_interval => '', + :rados_connection_retries => '', + :rbd_store_chunk_size => '' } end @@ -34,6 +38,10 @@ describe 'cinder::volume::rbd' do is_expected.to contain_cinder_config('DEFAULT/rbd_pool').with_value(req_params[:rbd_pool]) is_expected.to contain_cinder_config('DEFAULT/rbd_user').with_value(req_params[:rbd_user]) is_expected.to contain_cinder_config('DEFAULT/rbd_secret_uuid').with_value(req_params[:rbd_secret_uuid]) + is_expected.to contain_cinder_config('DEFAULT/rados_connect_timeout').with_value(req_params[:rados_connect_timeout]) + is_expected.to contain_cinder_config('DEFAULT/rados_connection_interval').with_value(req_params[:rados_connection_interval]) + is_expected.to contain_cinder_config('DEFAULT/rados_connection_retries').with_value(req_params[:rados_connection_retries]) + is_expected.to contain_cinder_config('DEFAULT/rbd_store_chunk_size').with_value(req_params[:rbd_store_chunk_size]) is_expected.to contain_file('/etc/init/cinder-volume.override').with(:ensure => 'present') is_expected.to contain_file_line('set initscript env').with( :line => /env CEPH_ARGS=\"--id test\"/, diff --git a/spec/defines/cinder_backend_dellsc_iscsi_spec.rb b/spec/defines/cinder_backend_dellsc_iscsi_spec.rb index 63e321eb..8572e374 100644 --- a/spec/defines/cinder_backend_dellsc_iscsi_spec.rb +++ b/spec/defines/cinder_backend_dellsc_iscsi_spec.rb @@ -20,6 +20,7 @@ describe 'cinder::backend::dellsc_iscsi' do { :dell_sc_api_port => '', :dell_sc_server_folder => 'srv', + :dell_sc_verify_cert => '', :dell_sc_volume_folder => 'vol', :iscsi_port => '', } diff --git a/spec/defines/cinder_backend_glusterfs_spec.rb b/spec/defines/cinder_backend_glusterfs_spec.rb index facdf1c0..c2db15ff 100644 --- a/spec/defines/cinder_backend_glusterfs_spec.rb +++ b/spec/defines/cinder_backend_glusterfs_spec.rb @@ -21,6 +21,10 @@ describe 'cinder::backend::glusterfs' do it 'configures glusterfs volume driver' do is_expected.to contain_cinder_config('mygluster/volume_driver').with_value( 'cinder.volume.drivers.glusterfs.GlusterfsDriver') + is_expected.to contain_cinder_config('mygluster/glusterfs_backup_mount_point').with_value( + '') + is_expected.to contain_cinder_config('mygluster/glusterfs_backup_share').with_value( + '') is_expected.to contain_cinder_config('mygluster/glusterfs_shares_config').with_value( '/etc/cinder/other_shares.conf') is_expected.to contain_cinder_config('mygluster/glusterfs_sparsed_volumes').with_value( @@ -34,15 +38,6 @@ describe 'cinder::backend::glusterfs' do ) end - context "with an parameter which has been removed" do - before do - params.merge!({ - :glusterfs_disk_util => 'foo', - }) - end - it_raises 'a Puppet::Error', /glusterfs_disk_util is removed in Icehouse./ - end - context 'glusterfs backend with additional configuration' do before do params.merge!({:extra_options => {'mygluster/param1' => { 'value' => 'value1' }}}) diff --git a/spec/defines/cinder_backend_nfs_spec.rb b/spec/defines/cinder_backend_nfs_spec.rb index 6a4b794b..61f8da20 100644 --- a/spec/defines/cinder_backend_nfs_spec.rb +++ b/spec/defines/cinder_backend_nfs_spec.rb @@ -7,6 +7,7 @@ describe 'cinder::backend::nfs' do let :params do { :nfs_servers => ['10.10.10.10:/shares', '10.10.10.10:/shares2'], + :nfs_mount_attempts => '4', :nfs_mount_options => 'vers=3', :nfs_shares_config => '/etc/cinder/other_shares.conf', :nfs_disk_util => 'du', @@ -26,6 +27,8 @@ describe 'cinder::backend::nfs' do 'cinder.volume.drivers.nfs.NfsDriver') is_expected.to contain_cinder_config('hippo/nfs_shares_config').with_value( '/etc/cinder/other_shares.conf') + is_expected.to contain_cinder_config('hippo/nfs_mount_attempts').with_value( + '4') is_expected.to contain_cinder_config('hippo/nfs_mount_options').with_value( 'vers=3') is_expected.to contain_cinder_config('hippo/nfs_sparsed_volumes').with_value( diff --git a/spec/defines/cinder_backend_rbd_spec.rb b/spec/defines/cinder_backend_rbd_spec.rb index 368cc5ed..444d6b2b 100644 --- a/spec/defines/cinder_backend_rbd_spec.rb +++ b/spec/defines/cinder_backend_rbd_spec.rb @@ -18,6 +18,10 @@ describe 'cinder::backend::rbd' do :rbd_flatten_volume_from_snapshot => true, :volume_tmp_dir => '', :rbd_max_clone_depth => '0', + :rados_connect_timeout => '', + :rados_connection_interval => '', + :rados_connection_retries => '', + :rbd_store_chunk_size => '' } end @@ -43,6 +47,10 @@ describe 'cinder::backend::rbd' do is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_user").with_value(req_params[:rbd_user]) is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_secret_uuid").with_value(req_params[:rbd_secret_uuid]) is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/backend_host").with_value('rbd:'"#{req_params[:rbd_pool]}") + is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rados_connect_timeout").with_value(req_params[:rados_connect_timeout]) + is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rados_connection_interval").with_value(req_params[:rados_connection_interval]) + is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rados_connection_retries").with_value(req_params[:rados_connection_retries]) + is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_store_chunk_size").with_value(req_params[:rbd_store_chunk_size]) is_expected.to contain_file('/etc/init/cinder-volume.override').with(:ensure => 'present') is_expected.to contain_file_line('set initscript env').with( :line => /env CEPH_ARGS=\"--id test\"/,