Alexandros Kosiaris has uploaded a new change for review.
https://gerrit.wikimedia.org/r/249868
Change subject: exim: Add and use $::other_site to provide LDAP fallback
......................................................................
exim: Add and use $::other_site to provide LDAP fallback
exim supports a list as an argument to the ldap_default_servers
argument. We use this to provide a fallback for when the DC-local corp
LDAP mirror fails. For this to work, we need a mapping though of DCs to
their fallbacks. Introduce the $other_site variable to provide this
functionality
Bug: T82662
Change-Id: I68d77bf4bf17dbf782a36aad382f13f601c7d50f
---
M manifests/realm.pp
M templates/exim/exim4.conf.mx.erb
2 files changed, 13 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/68/249868/1
diff --git a/manifests/realm.pp b/manifests/realm.pp
index 6cfbddf..0c88311 100644
--- a/manifests/realm.pp
+++ b/manifests/realm.pp
@@ -36,6 +36,18 @@
default => '(undefined)'
}
+# This is used to define the fallback site and is to be used by application
that
+# are capable of automatically detecting a failed service and falling back to
+# another one. While the only 2 sites that make sense to really be here are
+# eqiad and codfw, ulsfo and esams are here for completeness.
+$other_site = $site ? {
+ 'codfw' => 'eqiad',
+ 'eqiad' => 'codfw',
+ 'ulsfo' => 'ulsfo',
+ 'esams' => 'esams',
+ default => '(undefined)'
+}
+
$site_tier = $::realm ? {
production => $::site ? {
'eqiad' => 'one',
diff --git a/templates/exim/exim4.conf.mx.erb b/templates/exim/exim4.conf.mx.erb
index 4fc0618..8c68a05 100644
--- a/templates/exim/exim4.conf.mx.erb
+++ b/templates/exim/exim4.conf.mx.erb
@@ -21,7 +21,7 @@
hide mysql_servers = m2-master.eqiad.wmnet/otrs/exim/<%= @otrs_mysql_password
%> : m2-slave.eqiad.wmnet/otrs/exim/<%= @otrs_mysql_password %>
# LDAP lookups (Office)
-ldap_default_servers = ldap-mirror.wikimedia.org
+ldap_default_servers = ldap-mirror.<%= @site %>.wikimedia.org :
ldap-mirror.<%= @other_site %>.wikimedia.org
LDAPPASSWORD=<%= @smtp_ldap_password %>
domainlist system_domains = @
--
To view, visit https://gerrit.wikimedia.org/r/249868
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I68d77bf4bf17dbf782a36aad382f13f601c7d50f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits