Add support for metric_cleanup_delay option
metric_cleanup_delay option is useful to configure the number of seconds to wait between cleaning of expired data. Change-Id: I8d2fccb0cef49246b3c15b0942ba6067519cee1f
This commit is contained in:
parent
e3347d7731
commit
1accdde363
@ -14,6 +14,11 @@
|
||||
# (optional) the number of workers.
|
||||
# Defaults to $::os_workers
|
||||
#
|
||||
# [*cleanup_delay*]
|
||||
# (optional) How many seconds to wait between
|
||||
# cleaning of expired data.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*manage_service*]
|
||||
# (optional) Whether the service should be managed by Puppet.
|
||||
# Defaults to true.
|
||||
@ -22,13 +27,15 @@ class gnocchi::metricd (
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
$workers = $::os_workers,
|
||||
$cleanup_delay = $::os_service_default,
|
||||
$package_ensure = 'present',
|
||||
) inherits gnocchi::params {
|
||||
|
||||
include ::gnocchi::deps
|
||||
|
||||
gnocchi_config {
|
||||
'metricd/workers': value => $workers;
|
||||
'metricd/workers': value => $workers;
|
||||
'metricd/metric_cleanup_delay': value => $cleanup_delay;
|
||||
}
|
||||
|
||||
package { 'gnocchi-metricd':
|
||||
|
@ -65,6 +65,16 @@ describe 'gnocchi::metricd' do
|
||||
is_expected.to contain_gnocchi_config('metricd/workers').with_value('2')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with cleanup_delay set' do
|
||||
before do
|
||||
params.merge!({
|
||||
:cleanup_delay => 30 })
|
||||
end
|
||||
it 'configures gnocchi metricd cleanup_delay value' do
|
||||
is_expected.to contain_gnocchi_config('metricd/metric_cleanup_delay').with_value('30')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
|
Loading…
Reference in New Issue
Block a user