Dzahn has submitted this change and it was merged.

Change subject: ganglia: on systemd only start service if site is monitored site
......................................................................


ganglia: on systemd only start service if site is monitored site

On system each aggregator instance is a separate service, unlike
before when one meta service was spawning multiple aggregators.

If we try to start this for each "cluster" but don't generate the configs
for each cluster we get some failed service starts on each puppet run.

Instead we just want the service if the current site is a monitored
site, just like config files are only created if the site is a monitored site.

Change-Id: I8b0866e19bbcd697215c4cbbbd988700ef32b676
---
M modules/ganglia/manifests/monitor/aggregator/instance.pp
1 file changed, 8 insertions(+), 5 deletions(-)

Approvals:
  jenkins-bot: Verified
  Dzahn: Looks good to me, approved



diff --git a/modules/ganglia/manifests/monitor/aggregator/instance.pp 
b/modules/ganglia/manifests/monitor/aggregator/instance.pp
index f2daaaf..dca74ad 100644
--- a/modules/ganglia/manifests/monitor/aggregator/instance.pp
+++ b/modules/ganglia/manifests/monitor/aggregator/instance.pp
@@ -58,11 +58,14 @@
 
     # on systemd each instance is a separate service
     # which is spawned from a common service template
-    if $::initsystem == 'systemd' {
-        service { "ganglia-monitor-aggregator@${id}.service":
-            ensure   => running,
-            provider => systemd,
-            enable   => true,
+    # and we only want to run it if the site is a monitored site
+    if $monitored_site in $sites {
+        if $::initsystem == 'systemd' {
+            service { "ganglia-monitor-aggregator@${id}.service":
+                ensure   => running,
+                provider => systemd,
+                enable   => true,
+            }
         }
     }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/285295
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8b0866e19bbcd697215c4cbbbd988700ef32b676
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <[email protected]>
Gerrit-Reviewer: Dzahn <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to