-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
sending a kill TERM signal does not result in containers being shut down #756
Comments
If you're trying to integrate with an init system, I would use Killing the fig process doesn't handle signals and forward them to all the running docker containers. I'm not sure if it should. |
If fig is to be used in init systems it seems very desirable - and it seems important regardless. Reading up on my signals, I figured out that Ctrl-C sends the SIGINT signal, whereas upstart just sends SIGTERM. Is there a good reason that fig should handle SIGINT gracefully, and not SIGTERM? My argument that fig should handle SIGTERM graceful is that fig is used to control services. If someone sends a SIGTERM to fig, they would expect the service to shut down - not just fig. That breaks the service control, and is unexpected. Furthermore, that SIGINT is capable of properly terminating the service when SIGTERM fails seems to me completely... wonky. |
@jbulchergist see #741, we'd actually like to change the behaviour of SIGINT, and have it not shutdown containers either. Having it shutdown containers on SIGTERM does make more sense than SIGINT. |
What data containers are you using?
The data Dockerfile:
|
I believe there is actually a race condition as well. If the log tailing starts after the container is already shut down then it will miss it. #603 (comment) |
Is that due to a broken container? Rather than changing the behavior of |
Part of this was fixed by #1754, but there might still be an issue with SIGTERM. |
When this is implemented https://github.com/buildkite/docker-signal-test has some test cases that can be implemented to verify SIGTERM behaviour. |
I'm using
fig up --no-recreate
to run a container, which works as expected. Fig apparently gets two services in the process (weird):When I perfirm
fig stop
, the container goes down as expected, but if I performkill 9341
, the container does not go down even though fig does:If the container does not shut down with a kill signal, it isn't possible to integrate it into upstart/systemd, is it?
The text was updated successfully, but these errors were encountered: