Merge "Add support for [storage] ceph_timeout"

This commit is contained in:
Zuul 2022-02-20 11:50:05 +00:00 committed by Gerrit Code Review
commit c1373508ea
3 changed files with 23 additions and 4 deletions

View File

@ -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;
}

View File

@ -0,0 +1,4 @@
---
features:
- |
The new ``gnocchi::storage::ceph::ceph_timeout`` parameter has been added.

View File

@ -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('<SERVICE DEFAULT>')
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({