mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 16:37:23 +00:00
provision: Do service <service-name> start instead of restart.
Doing service memcached start instead of restart fixed an issue on
focal build in GitHub actions, where it exits with code 1 when it
is done twice.It is done first in Install Dependencies step and then
again in last step where we call tools/ci/setup-backend again which
runs provision.
Furthermore, I don't belive there is a technical reason we use
restart over start; rather I think it was just a random choice with
the intend to just start the services in CI. I traced the code back
to commit 1f2f497cab if it helps.
Looking at the source code of memcached, the step that's failing is:
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
which is equivilent to: service memcached stop, we can rule out the
service memcache start since it works. Ideally, we do figure out and
solve the issue of why memcached fails when executing service
memcached stop but I am not equipped with debugging it. And this
workaround seems reasonable rather than a "hacky" solution.
For the relevant code in memcached see:
https://github.com/memcached/memcached/blob/master/scripts/memcached-init.
Finally, the change to the rest of services is for consistency.
This commit is contained in:
committed by
Tim Abbott
parent
7ff1fd5923
commit
e834439d82
@@ -399,10 +399,10 @@ def main(options: argparse.Namespace) -> "NoReturn":
|
||||
run_as_root(["cp", REPO_STOPWORDS_PATH, TSEARCH_STOPWORDS_PATH])
|
||||
|
||||
if CONTINUOUS_INTEGRATION and not options.is_build_release_tarball_only:
|
||||
run_as_root(["service", "redis-server", "restart"])
|
||||
run_as_root(["service", "memcached", "restart"])
|
||||
run_as_root(["service", "rabbitmq-server", "restart"])
|
||||
run_as_root(["service", "postgresql", "restart"])
|
||||
run_as_root(["service", "redis-server", "start"])
|
||||
run_as_root(["service", "memcached", "start"])
|
||||
run_as_root(["service", "rabbitmq-server", "start"])
|
||||
run_as_root(["service", "postgresql", "start"])
|
||||
elif "fedora" in os_families():
|
||||
# These platforms don't enable and start services on
|
||||
# installing their package, so we do that here.
|
||||
|
||||
Reference in New Issue
Block a user