Mark Bergsma has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/53765


Change subject: Manage aggregator instances through upstart directly
......................................................................

Manage aggregator instances through upstart directly

The ganglia-monitor-aggregator instance is still installed
to start all instances at boot time.

Change-Id: Ifae8ef7ab64dd1c0b26df0e978ac00cf87f2c95e
---
M modules/ganglia_new/manifests/monitor/aggregator.pp
M modules/ganglia_new/manifests/monitor/aggregator/instance.pp
2 files changed, 12 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/65/53765/1

diff --git a/modules/ganglia_new/manifests/monitor/aggregator.pp 
b/modules/ganglia_new/manifests/monitor/aggregator.pp
index 2ba6f95..c0afab3 100644
--- a/modules/ganglia_new/manifests/monitor/aggregator.pp
+++ b/modules/ganglia_new/manifests/monitor/aggregator.pp
@@ -18,15 +18,9 @@
                        mode => 0444;
        }
 
-       upstart_job { "ganglia-monitor-aggregator-instance": }
+       upstart_job { ["ganglia-monitor-aggregator", 
"ganglia-monitor-aggregator-instance"]: }
 
        # Instantiate aggregators for all clusters
        $cluster_list = keys($ganglia_new::configuration::clusters)
        instance{ $cluster_list: }
-
-       service { "ganglia-monitor-aggregator":
-               provider => upstart,
-               name => "ganglia-monitor-aggregator",
-               ensure => running
-       }
 }
diff --git a/modules/ganglia_new/manifests/monitor/aggregator/instance.pp 
b/modules/ganglia_new/manifests/monitor/aggregator/instance.pp
index 4e952c8..099da04 100644
--- a/modules/ganglia_new/manifests/monitor/aggregator/instance.pp
+++ b/modules/ganglia_new/manifests/monitor/aggregator/instance.pp
@@ -1,6 +1,4 @@
 define ganglia_new::monitor::aggregator::instance() {
-       Ganglia_new::Monitor::Aggregator::Instance[$title] -> 
Service[ganglia-monitor-aggregator]
-
        include ganglia_new::configuration, network::constants
 
        $aggregator = true
@@ -20,6 +18,16 @@
                require => File["/etc/ganglia/aggregators"],
                mode => 0444,
                content => template("$module_name/gmond.conf.erb"),
-               notify => Service["ganglia-monitor-aggregator"]
+               notify => Service["ganglia-monitor-aggregator-instance 
ID=${id}"]
+       }
+
+       service { "ganglia-monitor-aggregator-instance ID=${id}":
+               require => File["/etc/ganglia/aggregators/${id}.conf"],
+               provider => upstart,
+               name => "ganglia-monitor-aggregator-instance",
+               start => "/sbin/start ganglia-monitor-aggregator-instance 
ID=${id}",
+               stop => "/sbin/stop ganglia-monitor-aggregator-instance 
ID=${id}",
+               restart => "/sbin/restart ganglia-monitor-aggregator-instance 
ID=${id},"
+               ensure => running
        }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifae8ef7ab64dd1c0b26df0e978ac00cf87f2c95e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma <m...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to