Krinkle has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/394651 )
Change subject: Switch to `*.web.db.svc.eqiad.wmflabs`
......................................................................
Switch to `*.web.db.svc.eqiad.wmflabs`
Bug: T176686
Change-Id: I2631422949cd8af2cdf56208d576898e28a0eb87
---
M api.php
M src/App.php
2 files changed, 13 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/labs/tools/guc
refs/changes/51/394651/1
diff --git a/api.php b/api.php
index 2da5f12..76eb419 100644
--- a/api.php
+++ b/api.php
@@ -54,7 +54,12 @@
);
if ($metaRows) {
foreach ($metaRows as $row) {
- $host = $row['slice'];
+ // FIXME: Workaround https://phabricator.wikimedia.org/T176686
+ $host = preg_replace(
+ '/\.labsdb$/',
+ '.web.db.svc.eqiad.wmflabs',
+ $row['slice']
+ );
list($shard) = explode('.', $host);
$res = \LabsDB::query(
\LabsDB::getConnection($host, 'heartbeat'),
diff --git a/src/App.php b/src/App.php
index 7dd04c2..9fa292b 100644
--- a/src/App.php
+++ b/src/App.php
@@ -55,6 +55,13 @@
$host = $cluster;
}
+ // FIXME: Workaround https://phabricator.wikimedia.org/T176686
+ $host = preg_replace(
+ '/\.labsdb$/',
+ '.web.db.svc.eqiad.wmflabs',
+ $host
+ );
+
$dbname = "{$database}_p";
// Reuse existing connection if possible
--
To view, visit https://gerrit.wikimedia.org/r/394651
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2631422949cd8af2cdf56208d576898e28a0eb87
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/guc
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits