summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPradeep Kilambi <pkilambi@redhat.com>2017-04-19 10:58:05 -0400
committerPradeep Kilambi <pkilambi@redhat.com>2017-05-30 15:40:39 -0400
commit57f338f8dbce4918b729a25baea187d9a2a96ee5 (patch)
treea55b3310236820af5e6618d001a2566a5d868e48
parente45b5d3b2c556e64a966475b79e34c6d92bc6857 (diff)
Add metric_processing_delay paramstable/newton
Expose this param to tweak the delay between processing metrics in gnocchi. Change-Id: I5de5283d1b14e0bba63d6d9a440611914ba86ca4 (cherry picked from commit 315733a00c12fdc6586094394852f7e7d05c3eca)
Notes
Notes (review): Code-Review+2: Mykyta Karpin <mkarpin@mirantis.com> Code-Review+2: Emilien Macchi <emilien@redhat.com> Workflow+1: Emilien Macchi <emilien@redhat.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 07 Jun 2017 15:37:49 +0000 Reviewed-on: https://review.openstack.org/469230 Project: openstack/puppet-gnocchi Branch: refs/heads/stable/newton
-rw-r--r--manifests/storage.pp12
-rw-r--r--releasenotes/notes/add-metric-delay-c4b5db22171d9165.yaml3
-rw-r--r--spec/classes/gnocchi_storage_spec.rb6
3 files changed, 17 insertions, 4 deletions
diff --git a/manifests/storage.pp b/manifests/storage.pp
index 2b7bf34..7ff9947 100644
--- a/manifests/storage.pp
+++ b/manifests/storage.pp
@@ -24,10 +24,15 @@
24# (optional) The url to use for distributed group membership coordination. 24# (optional) The url to use for distributed group membership coordination.
25# Defaults to $::os_service_default. 25# Defaults to $::os_service_default.
26# 26#
27# [*metric_processing_delay*]
28# (optional) Delay between processng metrics
29# Defaults to $::os_service_default.
30#
27 31
28class gnocchi::storage( 32class gnocchi::storage(
29 $package_ensure = 'present', 33 $package_ensure = 'present',
30 $coordination_url = $::os_service_default, 34 $coordination_url = $::os_service_default,
35 $metric_processing_delay = $::os_service_default,
31) inherits gnocchi::params { 36) inherits gnocchi::params {
32 37
33 package { 'gnocchi-carbonara': 38 package { 'gnocchi-carbonara':
@@ -37,7 +42,8 @@ class gnocchi::storage(
37 } 42 }
38 43
39 gnocchi_config { 44 gnocchi_config {
40 'storage/coordination_url' : value => $coordination_url; 45 'storage/coordination_url' : value => $coordination_url;
46 'storage/metric_processing_delay' : value => $metric_processing_delay;
41 } 47 }
42 48
43} 49}
diff --git a/releasenotes/notes/add-metric-delay-c4b5db22171d9165.yaml b/releasenotes/notes/add-metric-delay-c4b5db22171d9165.yaml
new file mode 100644
index 0000000..419aef3
--- /dev/null
+++ b/releasenotes/notes/add-metric-delay-c4b5db22171d9165.yaml
@@ -0,0 +1,3 @@
1---
2fixes:
3 - Expose metric processing delay param.
diff --git a/spec/classes/gnocchi_storage_spec.rb b/spec/classes/gnocchi_storage_spec.rb
index eb949ba..25cd4df 100644
--- a/spec/classes/gnocchi_storage_spec.rb
+++ b/spec/classes/gnocchi_storage_spec.rb
@@ -20,11 +20,15 @@ describe 'gnocchi::storage' do
20 20
21 context 'with coordination' do 21 context 'with coordination' do
22 before do 22 before do
23 params.merge!({ :coordination_url => 'redis://localhost:6379' }) 23 params.merge!({
24 :coordination_url => 'redis://localhost:6379',
25 :metric_processing_delay => 30,
26 })
24 end 27 end
25 28
26 it 'configures backend_url' do 29 it 'configures backend_url' do
27 is_expected.to contain_gnocchi_config('storage/coordination_url').with_value('redis://localhost:6379') 30 is_expected.to contain_gnocchi_config('storage/coordination_url').with_value('redis://localhost:6379')
31 is_expected.to contain_gnocchi_config('storage/metric_processing_delay').with_value(30)
28 end 32 end
29 end 33 end
30 end 34 end