From 2066860ab60d54112ab949d4a733288bad58b2e3 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Tue, 18 Jan 2022 22:44:40 +0000 Subject: [PATCH] start-server: Start auxiliary services, if they exist. Services like go-camo and smokescreen are not stopped in stop-server, since they are upgraded and restarted by puppet application. As such, they also do not appear in start-server, despite the server relying on them to be running to function properly. Ensure those services are started, by starting them in start-server, if they are configured in supervisor on the host. --- scripts/restart-server | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/restart-server b/scripts/restart-server index 4093d2e463..0f9c05cc00 100755 --- a/scripts/restart-server +++ b/scripts/restart-server @@ -91,6 +91,13 @@ if has_application_server(): if has_process_fts_updates(): workers.append("process-fts-updates") +# Before we start (re)starting main services, make sure to start any +# optional auxiliary services that we don't stop, but do expect to be +# running, and aren't currently. +aux_services = list_supervisor_processes(["go-camo", "smokescreen"], only_running=False) +if aux_services: + subprocess.check_call(["supervisorctl", "start", *aux_services]) + if action == "restart" and len(workers) > 0: if args.less_graceful: # The less graceful form stops every worker now; we start them