ci: Fixed errors related to running services in ci production build.

Restart postgres service if provision is called in production test suite.
This is required because terminate-psql-sessions script (used
in tools/ci/setup-production) throws error if postgres service is not running.

Restart rabbitmq service if provision is called in production test suite.
This is done to start the node as Circle CI don't start services on installation.

Removed memcached restart as flush-memcached script (which is furthur
used in tools/ci/production) throws UNKNOWN READ FAILURE if memcached is restarted
in development.
This commit is contained in:
arpit551
2020-04-20 21:36:41 +05:30
committed by Tim Abbott
parent e6edf469ee
commit 56a5beddc0
2 changed files with 2 additions and 4 deletions

View File

@@ -391,9 +391,10 @@ def main(options: argparse.Namespace) -> "NoReturn":
run_as_root(["cp", REPO_STOPWORDS_PATH, TSEARCH_STOPWORDS_PATH])
if is_circleci and not options.is_production_test_suite:
run_as_root(["service", "rabbitmq-server", "restart"])
run_as_root(["service", "redis-server", "restart"])
run_as_root(["service", "memcached", "restart"])
if is_circleci:
run_as_root(["service", "rabbitmq-server", "restart"])
run_as_root(["service", "postgresql", "restart"])
elif "fedora" in os_families():
# These platforms don't enable and start services on