mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 12:33:40 +00:00
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:
@@ -33,9 +33,6 @@ mv /tmp/tmp.*/zulip-server-test.tar.gz ./
|
||||
# Shut down all services so that restarting postgres and rebuilding
|
||||
# the postgres database to match the prod installation setup will work.
|
||||
sudo supervisorctl stop all
|
||||
# Clear memcached to avoid contamination between development and prod
|
||||
# environments.
|
||||
sudo /etc/init.d/memcached restart
|
||||
|
||||
# Drop any open connections to the development postgres installation.
|
||||
sudo "$(dirname "$0")/../../scripts/setup/terminate-psql-sessions" postgres zulip zulip_base
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user