diff --git a/manifests/storage/ceph.pp b/manifests/storage/ceph.pp index ea9792c5..67d5e0fa 100644 --- a/manifests/storage/ceph.pp +++ b/manifests/storage/ceph.pp @@ -21,10 +21,6 @@ # # == Parameters # -# [*ceph_pool*] -# (optional) Ceph pool name to use. -# Defaults to 'gnocchi'. -# # [*ceph_username*] # (required) Ceph username to use. # @@ -36,6 +32,14 @@ # (optional) Ceph secret. # Defaults to $::os_service_default # +# [*ceph_pool*] +# (optional) Ceph pool name to use. +# Defaults to 'gnocchi'. +# +# [*ceph_timeout*] +# (optional) Ceph connection timeout in seconds. +# Defaults to $::os_service_default +# # [*ceph_conffile*] # (optional) Ceph configuration file. # Defaults to '/etc/ceph/ceph.conf'. @@ -53,6 +57,7 @@ class gnocchi::storage::ceph( $ceph_keyring = $::os_service_default, $ceph_secret = $::os_service_default, $ceph_pool = 'gnocchi', + $ceph_timeout = $::os_service_default, $ceph_conffile = '/etc/ceph/ceph.conf', $manage_rados = true, $package_ensure = 'present', @@ -70,6 +75,7 @@ class gnocchi::storage::ceph( 'storage/ceph_keyring': value => $ceph_keyring; 'storage/ceph_secret': value => $ceph_secret, secret => true; 'storage/ceph_pool': value => $ceph_pool; + 'storage/ceph_timeout': value => $ceph_timeout; 'storage/ceph_conffile': value => $ceph_conffile; } diff --git a/releasenotes/notes/ceph_timeout-770ca9c5ff60a976.yaml b/releasenotes/notes/ceph_timeout-770ca9c5ff60a976.yaml new file mode 100644 index 00000000..b31d6ec0 --- /dev/null +++ b/releasenotes/notes/ceph_timeout-770ca9c5ff60a976.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The new ``gnocchi::storage::ceph::ceph_timeout`` parameter has been added. diff --git a/spec/classes/gnocchi_storage_ceph_spec.rb b/spec/classes/gnocchi_storage_ceph_spec.rb index 04abb2b7..cd426d32 100644 --- a/spec/classes/gnocchi_storage_ceph_spec.rb +++ b/spec/classes/gnocchi_storage_ceph_spec.rb @@ -20,6 +20,7 @@ describe 'gnocchi::storage::ceph' do is_expected.to contain_gnocchi_config('storage/ceph_username').with_value('joe') is_expected.to contain_gnocchi_config('storage/ceph_keyring').with_value('client.admin') is_expected.to contain_gnocchi_config('storage/ceph_pool').with_value('gnocchi') + is_expected.to contain_gnocchi_config('storage/ceph_timeout').with_value('') is_expected.to contain_gnocchi_config('storage/ceph_conffile').with_value('/etc/ceph/ceph.conf') end @@ -73,6 +74,14 @@ describe 'gnocchi::storage::ceph' do :tag => ['openstack', 'gnocchi-package'], )} end + + context 'with ceph_timeout' do + before do + params.merge!( :ceph_timeout => 30 ) + end + + it { is_expected.to contain_gnocchi_config('storage/ceph_timeout').with_value(30) } + end end on_supported_os({