-
Notifications
You must be signed in to change notification settings - Fork 316
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
[feature request] Allow user defined stop hook #5135
Comments
Still valid, post v0.56 |
I have a similar issue here, proposing a number of hooks: #4923 |
If I'm understanding this correctly, then I think core/rabbitmq already does something like this, albeit in a roundabout way: |
For the stop hook to be useful, my guess is we will also need a configurable timeout as described in #2447 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you. |
While the configurable signal and timeout that was added cover many use cases, I still think we should consider supporting stop hooks or close this with a clear statement of why we don't want them. A number of services create their own "stop" hooks by installing a signal handler as part of their |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you. |
1 similar comment
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you. |
Occasionally, properly shutting down a service requires something other than simply sending a
SIGTERM
. For example, we would like our default PostgreSQL shutdown behavior to be the "Fast Shutdown" that is documented here:https://www.postgresql.org/docs/9.6/static/server-shutdown.html
Other process supervisors such as runit allow users to customize the shutdown behavior (http://smarden.org/runit/runsv.8.html). It would be good if Habitat allowed something similar.
A
stop
hook would fit in nicely with the existing lifecycle hooks.The
stop
hook would also benefit from a documented and supported way to reference the main PID under supervision.The text was updated successfully, but these errors were encountered: