Skip to content

Commit

Permalink
scion.sh: block for child processes at shutdown (#4445)
Browse files Browse the repository at this point in the history
The `supervisorctl shutdown` command does not block for the supervisor
or its child processes to terminate.
This can occasionally lead to situations where SCION processes were
still running after the `scion.sh stop` command returned. In the CI
system, which immediately proceeds to bundle up the log files, this led
to `tar` reporting an error that the log file was still being written
to.
Fixed by invoking `supervisorctl stop all`, which does block, to
terminate all child processes before `shutdown`.
  • Loading branch information
matzf authored Nov 23, 2023
1 parent c1e1abc commit c890767
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ stop_scion() {
if is_docker_be; then
./tools/quiet ./tools/dc down
else
./tools/quiet tools/supervisor.sh shutdown
./tools/quiet tools/supervisor.sh stop all # blocks until child processes are stopped
./tools/quiet tools/supervisor.sh shutdown # shutdown does not block, but as children are already stopped, actual shutdown will be prompt too.
run_teardown
fi
}
Expand Down

0 comments on commit c890767

Please sign in to comment.