Ori.livneh has uploaded a new change for review.

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

Change subject: add /etc/wikimedia-cluster
......................................................................

add /etc/wikimedia-cluster

Avoid making dozens of fstat() calls during request initialization by having a
single file that tells you which settings you need to load -- if labs, then
'labs'; if production, then the datacenter-specific settings.

Change-Id: Ia6c5ffa2eabab3df3e0f00915a6ec3ae12578c0b
---
M modules/base/manifests/environment.pp
1 file changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/72/250172/1

diff --git a/modules/base/manifests/environment.pp 
b/modules/base/manifests/environment.pp
index 9a35bee..5cb12c5 100644
--- a/modules/base/manifests/environment.pp
+++ b/modules/base/manifests/environment.pp
@@ -89,6 +89,21 @@
         content => "${::realm}\n",
     }
 
+    $cluster = $::realm ? {
+        'labs'       => 'labs',
+        'production' => $::site,
+    }
+
+    file { '/etc/wikimedia-cluster':
+        owner   => 'root',
+        group   => 'root',
+        mode    => '0444',
+        content => $::realm ? {
+            'labs'       => "labs\n",
+            'production' => "${::site}\n",
+        },
+    }
+
 
     ### Core dumps
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6c5ffa2eabab3df3e0f00915a6ec3ae12578c0b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>

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

Reply via email to