-
Notifications
You must be signed in to change notification settings - Fork 498
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 not launched as subreaper #1268
Comments
link #1155 |
@kumy I wasn't able to reproduce the error message from above:
Then from another terminal:
Can you tell me your Docker version, host version, and maybe anything else that can help us reproduce your scenario? Thanks! |
Ok I've discovered what's different in our config, the docker daemon has I'm able to reproduce on my workstation using $ sudo docker run --rm -i --init gomods/athens:v0.4.0
[WARN tini (6)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
time="2019-06-04T13:37:18Z" level=info msg="Exporter not specified. Traces won't be exported"
2019-06-04 13:37:18.081821 I | Starting application at port :3000
^C$ sudo docker run --rm -i --init -e TINI_SUBREAPER=true gomods/athens:v0.4.0
time="2019-06-04T13:39:10Z" level=info msg="Exporter not specified. Traces won't be exported"
2019-06-04 13:39:10.320030 I | Starting application at port :3000
^C$ |
@kumy if you're running docker with |
@fsouza the second |
@kumy yeah, sorry my bad x) What I meant is that since you're using @marwan-at-work there's a hacky alternative: introduce a custom entrypoint that checks the PID and only uses tini if it's |
@kumy so if you are running with |
if the above true, maybe ignoring the the warning message is better than the hack? A third option is to include the |
Also as you said, maybe changing the ENTRYPOINT on the fly (if a user is aware of their init configuration) is also not a bad alternative? |
I've added it for the demo so it can be reproduced by everyone (I've found this option originally in our production swarm cluster).
if the I've workaround it on our production, by adding |
Are you saying that the "docker tini" would not reap the zombie procs? |
@marpio You are certainly right! It seems this issue is really specific to configuration on our side, and there are plenty of workaround available. Feel free to close as is if you wish. |
@kumy @marwan-at-work do you think adding some documentation would be enough? |
Yes, that'd be great. |
Describe the bug
As used, tini is not registered as subreaper. So theorically, it doesn't works.
Error Message
To Reproduce
Nothing special, it's written in the startup logs.
docker run --rm -p 3000:3000 gomods/athens:v0.4.0
Expected behavior
Tini should by default be launched as subreaper
Environment (please complete the following information):
Additional context
Adding
-s
to the tini options should be sufficient. It can also be configured using environment variable, but it's not default.The text was updated successfully, but these errors were encountered: