1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

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
This commit is contained in:
epriestley 2016-05-26 12:10:30 -07:00
parent 727a7de759
commit 74a36f9d7b

View file

@ -4,16 +4,14 @@ abstract class PhabricatorConfigDatabaseController
extends PhabricatorConfigController {
protected function buildSchemaQuery() {
$conf = PhabricatorEnv::newObjectFromConfig(
'mysql.configuration-provider',
array($dao = null, 'w'));
$ref = PhabricatorDatabaseRef::getMasterDatabaseRef();
$api = id(new PhabricatorStorageManagementAPI())
->setUser($conf->getUser())
->setHost($conf->getHost())
->setPort($conf->getPort())
->setUser($ref->getUser())
->setHost($ref->getHost())
->setPort($ref->getPort())
->setNamespace(PhabricatorLiskDAO::getDefaultStorageNamespace())
->setPassword($conf->getPassword());
->setPassword($ref->getPass());
$query = id(new PhabricatorConfigSchemaQuery())
->setAPI($api);