Skip to content

Commit

Permalink
Stop openQA worker processes gracefully to avoid 5xx responses
Browse files Browse the repository at this point in the history
With this we no longer get `Stopping worker … immediately` which means that
`SIGKILL` is sent to the worker process. We instead get `Stopping worker …
gracefully` and only `SIGQUIT` is sent to the worker process so it can
still conclude its current request.

Related ticket/note: https://progress.opensuse.org/issues/162533#note-24
  • Loading branch information
Martchus committed Aug 15, 2024
1 parent ab9f78b commit d4b9b56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script/openqa-webui-daemon
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ function start_service {
# wait until openQA is ready to accept requests by waiting for its PID file
while [[ ! -e $pid_file ]] && [[ -e /proc/$pid ]]; do sleep 1; done

# terminate a previously started openQA instance
[[ $pid_last ]] && kill -s TERM "$pid_last"
# terminate the previously started openQA instance gracefully
[[ $pid_last ]] && kill -s SIGQUIT "$pid_last"

# keep running until openQA terminates (with the "wait"-builtin so bash can handle SIGHUP)
wait "$pid"
Expand Down

0 comments on commit d4b9b56

Please sign in to comment.