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
fix: use init option to prevent zombie ddev-router, for #5705 #5707
fix: use init option to prevent zombie ddev-router, for #5705 #5707
Conversation
Download the artifacts for this pull request:
See Testing a PR |
That fixes it for me. Thank you Stanislav! |
Great! This will make things a little easier. |
The SO article implies that this injects a |
Yeah, I don't really know what this change can bring and how safe it is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine. However, since we have only had the problem with the traefik router, why don't we just add the init option if we're running traefik? (Just move the init down a line.)
Apparently there is a path where the traefik binary doesn't handle signals correctly, and maybe that's what's happening.
With this, we see /sbin/docker-init injected as pid 1 in the container:
rfay@rfay-surface-goo:~/workspace/d10$ docker exec -it ddev-router bash
f70c5494795b:/mnt/ddev-global-cache/traefik$ ps -ef
PID USER TIME COMMAND
1 1000 0:00 /sbin/docker-init -- /entrypoint.sh --configFile=/mnt/ddev-global-cache/traefik/static_config.yaml
7 1000 0:00 traefik traefik --configFile=/mnt/ddev-
docker-init is just `tini1 apparently packaged for docker's use, not sure why they use a different name:
f70c5494795b:/mnt/ddev-global-cache/traefik$ /sbin/docker-init -h
docker-init (tini version 0.19.0 - git.de40ad0)
Usage: docker-init [OPTIONS] PROGRAM -- [ARGS] | --version
Execute a program under the supervision of a valid init process (docker-init)
Command line options:
--version: Show version and exit.
-h: Show this help message and exit.
-s: Register as a process subreaper (requires Linux >= 3.4).
-p SIGNAL: Trigger SIGNAL when parent dies, e.g. "-p SIGKILL".
-v: Generate more verbose output. Repeat up to 3 times.
-w: Print a warning when processes are getting reaped.
-g: Send signals to the child's process group.
-e EXIT_CODE: Remap EXIT_CODE (from 0 to 255) to 0.
-l: Show license and exit.
Environment variables:
TINI_SUBREAPER: Register as a process subreaper (requires Linux >= 3.4).
TINI_VERBOSITY: Set the verbosity level (default: 1).
TINI_KILL_PROCESS_GROUP: Send signals to the child's process group.
I'm surprised not to see issues in the traefik queue about zombies.
Co-authored-by: Randy Fay <randy@randyfay.com>
Great, thank you. I didn't know that this didn't happen with nginx-proxy, so it makes sense to only use it with Traefik. I've restarted the tests to make sure everything is fine. |
The Issue
How This PR Solves The Issue
The error suggests to use
init
, it doesn't harm to try it forddev-router
:Manual Testing Instructions
I cannot reproduce this error, at least it should not break the tests. See the issue.
Automated Testing Overview
Related Issue Link(s)
Release/Deployment Notes