Ottomata has submitted this change and it was merged.

Change subject: Add rack information for new elasticsearch nodes
......................................................................


Add rack information for new elasticsearch nodes

Also, remove fail() out of case selector.  Having it there causes
  Function 'fail' does not return a value
from puppet, instead of actually showing the fail messages.
See: https://tickets.puppetlabs.com/browse/PUP-1457

Change-Id: I063828239576bf0bcac3d5d8aed7a21be25c24d4
---
M manifests/role/elasticsearch.pp
1 file changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/manifests/role/elasticsearch.pp b/manifests/role/elasticsearch.pp
index 6cf8d72..9a57c61 100644
--- a/manifests/role/elasticsearch.pp
+++ b/manifests/role/elasticsearch.pp
@@ -85,8 +85,15 @@
             /^elastic100[0-6]/          => 'A3',
             /^elastic10(0[7-9]|1[0-2])/ => 'C5',
             /^elastic101[3-9]/          => 'D3',
-            default                     => fail("Don't know rack for $::host"),
+            /^elastic10(1[3-9]|2[0-2])/ => 'D3',
+            /^elastic10(2[3-9]|3[01])/  => 'D4',
+            default                     => 'Unknown',
         }
+
+        if ($rack == 'Unknown') {
+             fail("Don't know rack for $::host")
+        }
+
         $row                  = regsubst($rack, '^(.).$', '\1' )
         # We've temporarily turned off awareness because we believe it puts
         # unbalanced load on the cluster.

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

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

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

Reply via email to