jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/351767 )
Change subject: Remove EtcdConfig from beta cluster for now ...................................................................... Remove EtcdConfig from beta cluster for now To match production. We're not planning on immediately deploying it to production anymore. Change-Id: Ifc7b1ea802d047ecaec723f71dfc0d26e738f853 --- M wmf-config/CommonSettings.php D wmf-config/etcd.php 2 files changed, 3 insertions(+), 51 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 2fade02..b024b3b 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -99,13 +99,9 @@ # Shorthand when we have no master-slave situation to keep into account $wmfLocalServices = $wmfAllServices[$wmfDatacenter]; -# Labs-only for testing, eventually etcd.php will be used in production as well -if ( $wmfRealm === 'labs' ) { - # Get configuration from etcd. This gives us the correct $wmfMasterDatacenter - require "$wmfConfigDir/etcd.php"; -} else { - $wmfMasterDatacenter = 'eqiad'; -} +# Master datacenter +# The datacenter from which we serve traffic. +$wmfMasterDatacenter = 'eqiad'; $wmfMasterServices = $wmfAllServices[$wmfMasterDatacenter]; diff --git a/wmf-config/etcd.php b/wmf-config/etcd.php deleted file mode 100644 index 161be4e..0000000 --- a/wmf-config/etcd.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php -# WARNING: This file is publically viewable on the web. Do not put private data here. -# -# Included very early by CommonSettings.php -# Only two sets of globals available here: -# - $wmfRealm, $wmfDatacenter (from multiversion/MWRealm) -# - $wmfLocalServices (from wmf-config/*Services.php) - -function wmfSetupEtcd() { - global $wmfRealm, $wmfDatacenter, $wmfLocalServices, $wgReadOnly, $wmfMasterDatacenter; - - # Create a local cache - if ( PHP_SAPI === 'cli' ) { - $localCache = new HashBagOStuff; - } else { - $localCache = new APCBagOStuff; - } - - # Set up local EtcdConfig with fallback to common EtcdConfig, this allows - # us to set $wgReadOnly differently in each datacenter - $etcdConfig = new MultiConfig( [ - new EtcdConfig( [ - 'host' => $wmfLocalServices['etcd'], - 'protocol' => 'https', - 'directory' => "conftool/v1/mediawiki-config/$wmfDatacenter", - 'cache' => $localCache, - ] ), - new EtcdConfig( [ - 'host' => $wmfLocalServices['etcd'], - 'protocol' => 'https', - 'directory' => "conftool/v1/mediawiki-config/common", - 'cache' => $localCache, - ] ), - ] ); - - # Read only mode - $wgReadOnly = $etcdConfig->get( 'ReadOnly' ); - - # Master datacenter - # The datacenter from which we serve traffic. - $wmfMasterDatacenter = $etcdConfig->get( 'WMFMasterDatacenter' ); -} - -wmfSetupEtcd(); -- To view, visit https://gerrit.wikimedia.org/r/351767 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifc7b1ea802d047ecaec723f71dfc0d26e738f853 Gerrit-PatchSet: 3 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Tim Starling <tstarl...@wikimedia.org> Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com> Gerrit-Reviewer: Krinkle <krinklem...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits