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

allow controlling the task stop signal #1755

Closed
jippi opened this issue Sep 27, 2016 · 14 comments
Closed

allow controlling the task stop signal #1755

jippi opened this issue Sep 27, 2016 · 14 comments

Comments

@jippi
Copy link
Contributor

jippi commented Sep 27, 2016

It would be nice to have a kill_singal config for tasks as not all programs react nicely to SIGINT :)

Example php-fpm handle signals like this

* SIGINT, SIGTERM: immediate termination 
* SIGQUIT: graceful stop 
* SIGUSR1: re-open log file 
* SIGUSR2: graceful reload of all workers + reload of fpm conf/binary 

where SIGINT will cause the process to die right away (not cleaning up), dropping any ongoing requests and give downtime / errors to the user

@sethvargo
Copy link
Contributor

Looks like this is currently hardcoded, but I agree it should be configurable.

@dadgar dadgar added this to the v0.5.1 milestone Sep 27, 2016
@jippi jippi changed the title allow controlling the stop signal in exec/raw_exec allow controlling the stop signal Nov 5, 2016
@jippi
Copy link
Contributor Author

jippi commented Nov 5, 2016

This is more generic, docker driver got the same problem.

Redis for example uses SIGTERM to graceful shutdown, and completely ignores SIGINT
Elasticsearch uses SIGTERM as well ( https://www.elastic.co/guide/en/elasticsearch/reference/master/stopping-elasticsearch.html )

@jippi jippi changed the title allow controlling the stop signal allow controlling the task stop signal Nov 5, 2016
@jippi
Copy link
Contributor Author

jippi commented Jan 17, 2017

Recent example(s) SIGINT is quick shutdown for nginx, where SIGQUIT will be graceful "let requests finish up" signal.

Very similar to PHP-FPM, Redis and ElasticSearch too :)

@nugend
Copy link

nugend commented Feb 7, 2017

A tool I work with only interprets SIGTERM as "graceful" termination. It dies without invoking its cleanup procedures when it catches SIGQUIT.

Given that the template stanza is actually implementing this functionality, what's blocking this?

@yellowmegaman
Copy link

Were useful feature indeed. I'm using containerpilot, so i have preStop and postStop steps, totally depending on SIGTERM signal + graceful timeout for it to complete.

@nugend
Copy link

nugend commented Mar 22, 2017

Could this be added to 0.6?

@dadgar
Copy link
Contributor

dadgar commented Mar 22, 2017

@nugend Definitely will be in a 0.6.x release.

@TUIteamup
Copy link

@dadgar Is it confirmed that this will be in 0.6.x release? Thanks

@dadgar
Copy link
Contributor

dadgar commented May 5, 2017

Still shooting for 0.6.X, not 0.6.0.

@nugend
Copy link

nugend commented Sep 12, 2017

I see that 0.7 is now in the works. Is this story going to be included in that release or is it still targeted for a 0.6.X release?

@jippi
Copy link
Contributor Author

jippi commented Oct 6, 2017

@dadgar will this make it to 0.7 ? and is it actually possible to control for Docker containers?

@nugend
Copy link

nugend commented Nov 2, 2017

I know that this isn't like a platform priority for you guys, but this would let me throw out some very janky shell scripting.

@nugend
Copy link

nugend commented Jan 5, 2018

@jippi I think this can be closed now.

@jippi jippi closed this as completed Jan 5, 2018
@tgross tgross removed this from the near-term milestone Jan 9, 2020
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants