From c9986fd5dee6e8efb162720d05cc6bd0c259f151 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 17 Aug 2017 09:41:37 -0700 Subject: [PATCH] Don't fatal in ElasticSearch setup check if no "master" database is configured Summary: Ref T12965. See that task for discussion, and PHI36 for context. This sweeps the fatal under the rug by skipping it, letting things move forward for now. Test Plan: Followed instructions in T12965, got a read-only recovery after restart instead of a fatal. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12965 Differential Revision: https://secure.phabricator.com/D18440 --- .../config/check/PhabricatorElasticsearchSetupCheck.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/applications/config/check/PhabricatorElasticsearchSetupCheck.php b/src/applications/config/check/PhabricatorElasticsearchSetupCheck.php index 157db5e141..cd29ecdc78 100644 --- a/src/applications/config/check/PhabricatorElasticsearchSetupCheck.php +++ b/src/applications/config/check/PhabricatorElasticsearchSetupCheck.php @@ -7,6 +7,12 @@ final class PhabricatorElasticsearchSetupCheck extends PhabricatorSetupCheck { } protected function executeChecks() { + // TODO: Avoid fataling if we don't have a master database configured + // but have the MySQL search index configured. See T12965. + if (PhabricatorEnv::isReadOnly()) { + return; + } + $services = PhabricatorSearchService::getAllServices(); foreach ($services as $service) {