Skip to content

Commit

Permalink
Merge pull request #160 from matyasselmeci/pr/reorg-and-tini
Browse files Browse the repository at this point in the history
Use tini when using cvmfsexec to handle signal propagation
  • Loading branch information
matyasselmeci authored Nov 17, 2023
2 parents 643f13c + da75491 commit 7b9894d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ RUN useradd osg \
rsyslog rsyslog-gnutls python3-cryptography python3-requests \
bind-utils \
socat \
tini \
&& if [[ $BASE_OS != el9 ]]; then yum -y install redhat-lsb-core; fi \
&& yum clean all \
&& mkdir -p /etc/condor/passwords.d /etc/condor/tokens.d
Expand Down
8 changes: 7 additions & 1 deletion sbin/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,10 @@ if [ "x$SUPERVISORD_RESTART_POLICY" != "x" ]; then
add_or_replace "$htcondor_supervisord_config" autorestart "${SUPERVISORD_RESTART_POLICY}"
fi

exec $cvmfsexec_root/cvmfsexec -N $CVMFSEXEC_REPOS -- "$@"
if [[ $1 == /usr/local/sbin/supervisord_startup.sh ]]; then
# If we're starting the pilot then run cvmfsexec under tini so signals are propagated
exec tini $cvmfsexec_root/cvmfsexec -- -N $CVMFSEXEC_REPOS -- "$@"
else
# If we're exec'ing in or running an alternate command, then just run cvmfsexec.
exec $cvmfsexec_root/cvmfsexec -N $CVMFSEXEC_REPOS -- "$@"
fi

0 comments on commit 7b9894d

Please sign in to comment.