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

tini childs dont't receive sigterm after docker stop #229

Open
ardenisov opened this issue Sep 30, 2024 · 1 comment
Open

tini childs dont't receive sigterm after docker stop #229

ardenisov opened this issue Sep 30, 2024 · 1 comment

Comments

@ardenisov
Copy link

Hello!
I have several ZEBRA daemons running in docker container with tini as entrypoint.
The problem is that all zebra daemons receive SIGKILL when container stopped..

ZEBRA processes in docker container for example:

ps -a
PID   USER     TIME  COMMAND
    1 root      0:00 /sbin/tini -vvv -- /usr/lib/frr/docker-start
    7 root      0:00 {docker-start} /bin/bash /usr/lib/frr/docker-start
   11 root      0:00 /usr/lib/frr/watchfrr zebra mgmtd bgpd staticd bfdd
   27 frr       0:01 /usr/lib/frr/zebra -d -F traditional -A 127.0.0.1 -s 90000000 -M dplane_fpm_nl
   33 frr       0:00 /usr/lib/frr/mgmtd -d -F traditional
   35 frr       0:00 /usr/lib/frr/bgpd -d -F traditional -A 127.0.0.1
   42 frr       0:00 /usr/lib/frr/staticd -d -F traditional -A 127.0.0.1
   45 frr       0:02 /usr/lib/frr/bfdd -d -F traditional -A 127.0.0.1

All ZEBRA daemons have parent pid of tini (1):

cat /proc/27/status | grep PPid
PPid:	1
cat /proc/33/status | grep PPid
PPid:	1
cat /proc/35/status | grep PPid
PPid:	1
cat /proc/42/status | grep PPid
PPid:	1
cat /proc/45/status | grep PPid
PPid:	1

Another look to tini children:

pgrep -lP 1
7 /bin/bash
27 /usr/lib/frr/zebra
33 /usr/lib/frr/mgmtd
35 /usr/lib/frr/bgpd
42 /usr/lib/frr/staticd
45 /usr/lib/frr/bfdd

but only one process receive sigterm in tini logs

[DEBUG tini (1)] Passing signal: 'Terminated'
[TRACE tini (1)] No child to reap
[DEBUG tini (1)] Received SIGCHLD
[DEBUG tini (1)] Reaped child with pid: '7'
[INFO  tini (1)] Main child exited with signal (with signal 'Terminated')
[TRACE tini (1)] No child to reap
[TRACE tini (1)] Exiting: child has exited

I expect that all tini children must receive SIGTERM not only PID 7.

@krallin
Copy link
Owner

krallin commented Sep 30, 2024 via email

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

No branches or pull requests

2 participants