Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use tini when using cvmfsexec to handle signal propagation #160

Merged

Conversation

matyasselmeci
Copy link
Contributor

We have an issue where if the container uses cvmfsexec to mount repos, then a SIGTERM (as sent by docker stop) won't shut it down and we have to wait for docker to time out and send SIGKILL.

This is because cvmfsexec is pid 1 inside the container, which is special, and we have to have it explicitly forward the signals to the child processes. If we don't use cvmfsexec, then supervisord is pid 1, and signal propagation is handled.

This commit adds tini, a small init system, to handle signal propagation; it is only used when we're using cvmfsexec.

We have an issue where if the container uses cvmfsexec to mount repos,
then a SIGTERM (as sent by docker stop) won't shut it down and we have
to wait for docker to time out and send SIGKILL.

This is because cvmfsexec is pid 1 inside the container, which is
special, and we have to have it explicitly forward the signals to the
child processes.  If we don't use cvmfsexec, then supervisord is pid 1,
and signal propagation is handled.

This commit adds `tini`, a small init system, to handle signal
propagation; it is only used when we're using cvmfsexec.
Copy link
Member

@rynge rynge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix! It is a little bit odd to have both tini and supervisord in the same container, but whatever works.

@matyasselmeci matyasselmeci merged commit 7b9894d into opensciencegrid:master Nov 17, 2023
10 checks passed
@matyasselmeci matyasselmeci deleted the pr/reorg-and-tini branch November 17, 2023 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants