Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: ganglia_clusters: s/name/description/
......................................................................


ganglia_clusters: s/name/description/

If we want to feed this data structure to create_resources, 'name' is
not an acceptable parameter. So change it to 'description', which does
no harm.

Change-Id: Ic5548d1d5ff4ffeef9c635ade3d59d23a4dc39d6
---
M hieradata/common.yaml
M modules/ganglia/lib/puppet/parser/functions/ganglia_aggregator_config.rb
M modules/ganglia/manifests/monitor/aggregator/instance.pp
3 files changed, 45 insertions(+), 45 deletions(-)

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



diff --git a/hieradata/common.yaml b/hieradata/common.yaml
index 7e595e3..579596c 100644
--- a/hieradata/common.yaml
+++ b/hieradata/common.yaml
@@ -13,11 +13,11 @@
 # and a different IP prefix will be used.
 ganglia_clusters:
   decommissioned:
-    name: "Decommissioned servers"
+    description: "Decommissioned servers"
     id: 1
     sites: {}
   lvs:
-    name: "LVS loadbalancers"
+    description: "LVS loadbalancers"
     id: 2
     sites:
       eqiad: []
@@ -25,63 +25,63 @@
       esams: []
       ulsfo: []
   puppet:
-    name: "Puppetmasters"
+    description: "Puppetmasters"
     id: 3
     sites:
       eqiad: []
       codfw: []
   search:
-    name: "Search"
+    description: "Search"
     id: 4
     sites: {}
   mysql:
-    name: "MySQL"
+    description: "MySQL"
     id: 5
     sites:
       eqiad: []
       codfw: []
   etcd:
-    name: "Etcd"
+    description: "Etcd"
     id: 6
     sites:
       eqiad: []
   eventbus:
-    name: "Eventbus"
+    description: "Eventbus"
     id: 7
     sites:
       eqiad: []
   misc:
-    name: "Miscellaneous"
+    description: "Miscellaneous"
     id: 8
     sites:
       eqiad: []
       codfw: []
       esams: []
   appserver:
-    name: "Application servers"
+    description: "Application servers"
     id: 11
     sites:
       eqiad: []
       codfw: []
   imagescaler:
-    name: "Image scalers"
+    description: "Image scalers"
     id: 12
     sites:
       eqiad: []
       codfw: []
   api_appserver:
-    name: "API application servers"
+    description: "API application servers"
     id: 13
     sites:
       eqiad: []
       codfw: []
   pdf:
-    name: "PDF servers"
+    description: "PDF servers"
     id: 15
     sites:
       eqiad: []
   cache_text:
-    name: "Text caches"
+    description: "Text caches"
     id: 20
     sites:
       eqiad: []
@@ -89,7 +89,7 @@
       esams: []
       ulsfo: []
   cache_upload:
-    name: "Upload caches"
+    description: "Upload caches"
     id: 22
     sites:
       eqiad: []
@@ -97,84 +97,84 @@
       esams: []
       ulsfo: []
   payments:
-    name: "Fundraiser payments"
+    description: "Fundraiser payments"
     id: 23
     sites: {}
   ssl:
-    name: "SSL cluster"
+    description: "SSL cluster"
     id: 26
     sites: {}
   swift:
-    name: "Swift"
+    description: "Swift"
     id: 27
     sites:
       eqiad: []
       codfw: []
       esams: []
   labvirt:
-    name: "Labs virt hosts"
+    description: "Labs virt hosts"
     id: 29
     sites:
       eqiad: []
   labs:
-    name: "Labs services"
+    description: "Labs services"
     id: 30
     sites:
       eqiad: []
   jobrunner:
-    name: "Jobrunners"
+    description: "Jobrunners"
     id: 31
     sites:
       eqiad: []
       codfw: []
   analytics:
-    name: "Analytics cluster"
+    description: "Analytics cluster"
     id: 32
     sites:
       eqiad: []
   memcached:
-    name: "Memcached"
+    description: "Memcached"
     id: 33
     sites:
       eqiad: []
       codfw: []
   videoscaler:
-    name: "Video scalers"
+    description: "Video scalers"
     id: 34
     sites:
       eqiad: []
       codfw: []
   fundraising:
-    name: "Fundraising"
+    description: "Fundraising"
     id: 35
     sites:
       eqiad:
         - pay-lvs1001.frack.eqiad.wmnet
         - pay-lvs1002.frack.eqiad.wmnet
   ceph:           # Not used anymore
-    name: "Ceph"
+    description: "Ceph"
     id: 36
     sites: {}
   parsoid:
-    name: "Parsoid"
+    description: "Parsoid"
     id: 37
     sites:
       eqiad: []
       codfw: []
   redis:
-    name: "Redis"
+    description: "Redis"
     id: 39
     sites:
       eqiad: []
       codfw: []
   labsnfs:
-    name: "Labs NFS cluster"
+    description: "Labs NFS cluster"
     id: 40
     sites:
       eqiad: []
       codfw: []
   cache_misc:
-    name: "Misc Web caching cluster"
+    description: "Misc Web caching cluster"
     id: 41
     sites:
       eqiad: []
@@ -182,50 +182,50 @@
       esams: []
       ulsfo: []
   elasticsearch:
-    name: "Elasticsearch cluster"
+    description: "Elasticsearch cluster"
     id: 42
     sites:
       eqiad: []
       codfw: []
   logstash:
-    name: "Logstash cluster"
+    description: "Logstash cluster"
     id: 43
     sites:
       eqiad: []
   rcstream:
-    name: "RCStream cluster"
+    description: "RCStream cluster"
     id: 44
     sites:
       eqiad: []
   analytics_kafka:
-    name: "Analytics Kafka cluster"
+    description: "Analytics Kafka cluster"
     id: 45
     sites:
       eqiad: []
   sca:
-    name: "Service Cluster A"
+    description: "Service Cluster A"
     id: 46
     sites:
       eqiad: []
       codfw: []
   restbase:
-    name: "Restbase"
+    description: "Restbase"
     id: 48
     sites:
       eqiad: []
       codfw: []
   wdqs:
-    name: "Wikidata Query Service"
+    description: "Wikidata Query Service"
     id: 49
     sites:
       eqiad: []
   maps:
-    name: "Maps Cluster"
+    description: "Maps Cluster"
     id: 50
     sites:
       codfw: []
   cache_maps:
-    name: "Maps caches"
+    description: "Maps caches"
     id: 51
     sites:
       eqiad: []
@@ -233,30 +233,30 @@
       esams: []
       ulsfo: []
   ganeti:
-    name: "Ganeti Virt cluster"
+    description: "Ganeti Virt cluster"
     id: 52
     sites:
       eqiad: []
       codfw: []
   scb:
-    name: "Service Cluster B"
+    description: "Service Cluster B"
     id: 53
     sites:
       eqiad: []
       codfw: []
   aqs:
-    name: "Analytics Query Service"
+    description: "Analytics Query Service"
     id: 54
     sites:
       eqiad: []
   restbase_test:
-    name: "Restbase test"
+    description: "Restbase test"
     id: 55
     sites:
       eqiad: []
       codfw: []
   relforge:
-    name: "Elasticsearch relforge cluster"
+    description: "Elasticsearch relforge cluster"
     id: 56
     sites:
       eqiad: []
diff --git 
a/modules/ganglia/lib/puppet/parser/functions/ganglia_aggregator_config.rb 
b/modules/ganglia/lib/puppet/parser/functions/ganglia_aggregator_config.rb
index f3e217c..73f2c72 100644
--- a/modules/ganglia/lib/puppet/parser/functions/ganglia_aggregator_config.rb
+++ b/modules/ganglia/lib/puppet/parser/functions/ganglia_aggregator_config.rb
@@ -15,7 +15,7 @@
     clusters = function_hiera(['ganglia_clusters'])
     clusters.each do |_cluster, data|
       data['sites'].each do |site, aggregators|
-        name = format('%s %s', data['name'], site)
+        name = format('%s %s', data['description'], site)
         if !aggregators.empty?
           aggregator = aggregators.join(' ')
         else
diff --git a/modules/ganglia/manifests/monitor/aggregator/instance.pp 
b/modules/ganglia/manifests/monitor/aggregator/instance.pp
index 4ca26ac..4ae57c6 100644
--- a/modules/ganglia/manifests/monitor/aggregator/instance.pp
+++ b/modules/ganglia/manifests/monitor/aggregator/instance.pp
@@ -19,7 +19,7 @@
         $sites = $ganglia::configuration::default_sites
     }
     $id = $ganglia::configuration::clusters[$cluster]['id'] + 
$ganglia::configuration::id_prefix[$monitored_site]
-    $desc = $ganglia::configuration::clusters[$cluster]['name']
+    $desc = $ganglia::configuration::clusters[$cluster]['description']
     $desc_safe = regsubst($desc, '/', '_', 'G')
     $gmond_port = $ganglia::configuration::base_port + $id
     $cname = "${desc_safe} ${::site}"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic5548d1d5ff4ffeef9c635ade3d59d23a4dc39d6
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <glavage...@wikimedia.org>
Gerrit-Reviewer: Giuseppe Lavagetto <glavage...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to