Skip to content

Commit 74a36f9

Browse files
author
epriestley
committedMay 26, 2016
Read "Database Status" page connection information from cluster config if present
Summary: Fixes T11043. This page was still reading the old information directly instead of going through the cluster-aware stuff. Have it ask the cluster-aware stuff for information instead. Test Plan: - Nuked MySQL on localhost. - Configured cluster hosts. - Loaded "Database Status" page -- worked after patch. - Grepped for any remaining `mysql.configuration-provider` stragglers, came up empty. Reviewers: chad Reviewed By: chad Maniphest Tasks: T11043 Differential Revision: https://secure.phabricator.com/D15982
1 parent 727a7de commit 74a36f9

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed
 

‎src/applications/config/controller/PhabricatorConfigDatabaseController.php

+5-7
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@ abstract class PhabricatorConfigDatabaseController
44
extends PhabricatorConfigController {
55

66
protected function buildSchemaQuery() {
7-
$conf = PhabricatorEnv::newObjectFromConfig(
8-
'mysql.configuration-provider',
9-
array($dao = null, 'w'));
7+
$ref = PhabricatorDatabaseRef::getMasterDatabaseRef();
108

119
$api = id(new PhabricatorStorageManagementAPI())
12-
->setUser($conf->getUser())
13-
->setHost($conf->getHost())
14-
->setPort($conf->getPort())
10+
->setUser($ref->getUser())
11+
->setHost($ref->getHost())
12+
->setPort($ref->getPort())
1513
->setNamespace(PhabricatorLiskDAO::getDefaultStorageNamespace())
16-
->setPassword($conf->getPassword());
14+
->setPassword($ref->getPass());
1715

1816
$query = id(new PhabricatorConfigSchemaQuery())
1917
->setAPI($api);

0 commit comments

Comments
 (0)
Failed to load comments.