File: storage-incoming-redis-use-multiple-config-files.patch

package info (click to toggle)
puppet-module-gnocchi 25.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,096 kB
  • sloc: ruby: 2,339; python: 38; makefile: 10; sh: 10
file content (48 lines) | stat: -rw-r--r-- 1,672 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Description: gnocchi::storage::incoming::redis: use multiple config files
 This patch makes it possible to use multiple config files, one for the
 API service, and one for the metricd daemon, so that they don't use the
 same Redis URLs.
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Last-Update: 2025-03-31

Index: puppet-module-gnocchi/manifests/storage/incoming/redis.pp
===================================================================
--- puppet-module-gnocchi.orig/manifests/storage/incoming/redis.pp
+++ puppet-module-gnocchi/manifests/storage/incoming/redis.pp
@@ -9,14 +9,30 @@
 #   (optional) Redis url.
 #
 class gnocchi::storage::incoming::redis(
-  $redis_url = undef,
+  $redis_url                         = undef,
+  $redis_url_metricd                 = undef,
+  Boolean $use_multiple_config_files = false,
 ) {
 
   include gnocchi::deps
 
-  gnocchi_config {
-    'incoming/driver':    value => 'redis';
-    'incoming/redis_url': value => $redis_url, secret => true;
+  if $use_multiple_config_files == true {
+    gnocchi_config {
+      'incoming/driver':    value => $facts['os_service_default'];
+      'incoming/redis_url': value => $facts['os_service_default'];
+    }
+    gnocchi_api_config {
+      'incoming/driver':    value => 'redis';
+      'incoming/redis_url': value => $redis_url, secret => true;
+    }
+    gnocchi_metricd_config {
+      'incoming/driver':    value => 'redis';
+      'incoming/redis_url': value => $redis_url_metricd, secret => true;
+    }
+  } else {
+    gnocchi_config {
+      'incoming/driver':    value => 'redis';
+      'incoming/redis_url': value => $redis_url, secret => true;
+    }
   }
-
 }