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
Add ES_STOP_TIMEOUT configuration variable to packages #3973
Add ES_STOP_TIMEOUT configuration variable to packages #3973
Conversation
any reason this has not been resolved yet? @spinscale ? |
@s1monw I think we need to fix the timeouts, as they are too low (20 seconds for TERM, 40 for KILL or something) and I would like to have someone with packaging knowledge review this one, if it is useful at all. @drewr @electrical can you have a look maybe, if this is good & useful? Going to extend the timeouts asap |
de4f259
to
720ceae
Compare
Looks good to me. Having the stop time configured defo makes sense. |
@electrical The more I think about it the more I agree that the only one to execute |
+1 to not do a |
+1, especially in light of #7563 which will perform a flush on shutdown |
This variable allows to configure the waiting time after a TERM signal has been sent. After that waiting time a KILL signal is sent to ensure the service is stopped. In case of a bigger installation the default values might be to slow, so it now is configurable. Also, we opted out from sending a KILL signal by default. This has to be explicitely done by using the ES_KILL_TIMEOUT variable. Original work done by @tmclaugh at the PR elastic#3719 Closes elastic#3719 Closes elastic#3972
720ceae
to
9b736f2
Compare
removed all the should this explicitely be disabled (which is possible), to make sure an init mechanism never sends a |
@electrical can you have a look and comment on my last question, if it makes sense to change the |
On the one hand we should not deviate from standards handled by a service manager. Imho when a stop fails there must be something wrong with it, for example shutdown takes longer or some other weird error. |
It is worth noting that the systemd service configuration does use a kill mechanism (and a timeout of 20 seconds) already. |
we decided to not allow for explicit configuration of this in our packages. If other 3rd party tool do that already that's a different story. If there is further evidence that we need to do that too we can still reopen the issue. |
@s1monw this is partially right. As I wrote above - the elasticsearch systemd configuration uses an explicit kill timeout of 20 seconds (see https://github.com/elasticsearch/elasticsearch/blob/master/src/rpm/systemd/elasticsearch.service#L17), I suppose this is a bug, then? |
I don't think so - I'd rather say it's maybe an inconsistency but we can fix it though. I don't have strong feelings about it to be honest I'd vote fore removing the kill there too? |
+1 for being consistent - users would expect the same behaviour on different init systems. |
This variable allows to configure the waiting time after a TERM signal has
been sent. After that waiting time a KILL signal is sent to ensure the
service is stopped.
In case of a bigger installation the default values might be to slow, so it
now is configurable.
Original work done by @tmclaugh at the PR #3719
Closes #3719
Closes #3972