Skip to content

Commit

Permalink
Always send SIGQUIT to HTCondor
Browse files Browse the repository at this point in the history
Before SIGTERM was used for graceful shutdown. Now SIGQUIT is forwarded to HTCondor no matter the signal received by the Glidein (INT, TERM, QUIT)

This was requested by FactoryOps -J.Dost- under HTCondor -J.Frey- suggestion to reduce the leftover files problem when Glideins are killed
  • Loading branch information
mambelli committed Dec 19, 2024
1 parent c1fa097 commit 96740e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Changes since the last release

### Changed defaults / behaviours

- Always send SIGQUIT to HTCondor when the Glidein receives INT, TERM, QUIT signals. This speeds up the shutdown (PR #466)

### Deprecated / removed options and commands

### Security Related Fixes
Expand Down
8 changes: 5 additions & 3 deletions creation/web_base/condor_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ trap_with_arg() {
# all of its children. When each child exits, the master will send a SIGKILL to any remaining descendants.
# Once all of the children exit, the master then exits.
on_die() {
condor_signal=$1
# Can receive SIGTERM SIGINT SIGQUIT, condor understands SIGTERM SIGQUIT. Send SIGQUIT for SIGQUIT, SIGTERM otherwise
[[ "$condor_signal" != SIGQUIT ]] && condor_signal=SIGTERM
# Can receive SIGTERM SIGINT SIGQUIT as $1, condor understands SIGTERM (graceful) SIGQUIT (fast). Send SIGQUIT for SIGQUIT, SIGTERM otherwise
# condor_signal=$1
# [[ "$condor_signal" != SIGQUIT ]] && condor_signal=SIGTERM
# The HTCondor team suggested to send always SIGQUIT to speedup the shutdown and avoid leftover files
condor_signal=SIGQUIT
condor_pid_tokill=$condor_pid
[[ -z "$condor_pid_tokill" ]] && condor_pid_tokill=`cat $PWD/condor_master2.pid 2> /dev/null`
echo "Condor startup received $1 signal ... shutting down condor processes (forwarding $condor_signal to $condor_pid_tokill)"
Expand Down

0 comments on commit 96740e4

Please sign in to comment.