Filippo Giunchedi has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/391240 )
Change subject: standard: map an host to its production cluster ...................................................................... standard: map an host to its production cluster The define is a rename of ganglia::cluster we use for the same task, namely an exported resource to map fqdn -> (site, cluster) and make it querable from puppetdb. In turn we use this mapping to generate a list of 'targets' for Prometheus to pick up. As we progressively deprecate Ganglia across the infrastructure less and less hosts have "has_ganglia: true" and thus are not getting their cluster mapping exported. This caused authdns machines to stop being polled by Prometheus, thus decouple the mapping from Ganglia. This change is meant to be temporary while we are figuring out the new semantics of $cluster without Ganglia in T179395. Bug: T180256 Bug: T179395 Change-Id: I7d5607e8292beed56ed5e842954bf306693ac074 --- A modules/standard/manifests/cluster.pp M modules/standard/manifests/init.pp 2 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/40/391240/1 diff --git a/modules/standard/manifests/cluster.pp b/modules/standard/manifests/cluster.pp new file mode 100644 index 0000000..dd38cb3 --- /dev/null +++ b/modules/standard/manifests/cluster.pp @@ -0,0 +1,7 @@ +# placeholder/shim define to be exported +define standard::cluster ( + $cluster, + $site, +) { + debug("exporting cluster ${cluster} in site ${site} for ${title}") +} diff --git a/modules/standard/manifests/init.pp b/modules/standard/manifests/init.pp index 17fcbe6..85308d3 100644 --- a/modules/standard/manifests/init.pp +++ b/modules/standard/manifests/init.pp @@ -11,6 +11,12 @@ if $::realm == 'production' { include ::profile::cumin::target + + # Associate this fqdn with its production cluster and site + @@standard::cluster { $::fqdn: + cluster => hiera('cluster', $cluster), + site => $::site, + } } unless $::fqdn in $::standard::ntp::wmf_peers[$::site] { -- To view, visit https://gerrit.wikimedia.org/r/391240 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d5607e8292beed56ed5e842954bf306693ac074 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi <fgiunch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits