mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
Fix a possible database ref fatal during MySQL setup checks if a host is unreachable
Summary: Ref T12966. See that task for a description and reproduction steps. If you put Phabricator in a master/replica configuration and then restart it, we may fatal here if the master is unreachable. Instead, we should survive setup checks. Test Plan: Put Phabricator in a master/replica configuration, explicitly disabled the master by misconfiguring the port, restarted Phabricator. Before: fatal; after: login screen in read-only mode. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12966 Differential Revision: https://secure.phabricator.com/D18442
This commit is contained in:
parent
c9986fd5de
commit
68008dce60
1 changed files with 7 additions and 1 deletions
|
@ -9,7 +9,13 @@ final class PhabricatorMySQLSetupCheck extends PhabricatorSetupCheck {
|
|||
protected function executeChecks() {
|
||||
$refs = PhabricatorDatabaseRef::getActiveDatabaseRefs();
|
||||
foreach ($refs as $ref) {
|
||||
$this->executeRefChecks($ref);
|
||||
try {
|
||||
$this->executeRefChecks($ref);
|
||||
} catch (AphrontConnectionQueryException $ex) {
|
||||
// If we're unable to connect to a host, just skip the checks for it.
|
||||
// This can happen if we're restarting during a cluster incident. See
|
||||
// T12966 for discussion.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue