-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
sigtrap only triggers on INT #1993
Comments
Yeah, this is intentional, and is as-documented: https://caddyserver.com/docs/cli#signals -- SIGINT and SIGQUIT execute the shutdown hooks. I suppose this could be changed if necessary, but I just haven't had a good reason to (yet?). |
fair enough Thanks! |
No problem! Let me know if it causes any trouble as-is. |
thinking some more. SIGTERM should do this as well, can prolly find in the posix spec. But graceful shutdown usually is done via TERM (and then a KILL). Kubernetes uses TERM as well, not sure I can find a way to change this for a specific deployment. |
Yes, please change; as SIGTERM and then a SIGKILL is pretty normal. Alternatively I could prepare (or move invasive PR) to makes this configurable, so CoreDNS can behave differerently than Caddy in this regard. |
looked at the wrong file. I (only?) need the |
The signal is already trapped; make it do the same thing as SIGQUIT to be more inline with Unix/Linux shutdown expectations. Fixes caddyserver#1993
* shutdown: allow graceful shutdown for SIGTERM on posix The signal is already trapped; make it do the same thing as SIGQUIT to be more inline with Unix/Linux shutdown expectations. Fixes #1993 * Implement comment feedback ideas
killing caddy (and coredns) should trigger OnFinalShutdown callbacks, while looking at the code (on why this isn't happening), I see https://github.com/mholt/caddy/blob/master/sigtrap.go#L40 is only trapping on SIGINT.
Is this intentional? Add SIGTERM here would make a lot of sense of kill sends this by default.
The text was updated successfully, but these errors were encountered: