-
Notifications
You must be signed in to change notification settings - Fork 146
spec: additional event handlers #188
Comments
Re-capturing a question raised in #62:
|
The need for a "graceful shutdown" hook seems pretty clear (expecting all the existing software in the world, that people want in a container, to follow the spec's SIGTERM rule might be impractical). I'm not however sure if "pre-stop" captures this. If "pre-stop" is used for graceful shutdown, there is no way for an executor to know if a process should have terminated or not due to the hook. Should there be special-case event handlers for life cycle events (e.g. "stop") that take the place of SIGTERM? "pre-kill" also seems reasonable due to past experience (e.g. a script that sends a SIGUSR or triggers a core dump, etc, on a process that is has not terminated as expected or within the allotted time). |
Beyond UNIX signals, it was raised in #12 that we should consider different kinds of termination signals such as HTTP GETs and/or Execs. |
@jonboulle I feel like it should always be an exec inside of the pod. If someone wants to implement a GET in that exec they can go for it. |
@cdaylward I see your ordering problem and what you are trying to capture with In my mind |
As part of this we should move away from the single unexplained |
If the additional event handlers are not added, it might be worth just removing them all together in favor of having people write this stuff in to their |
The current spec defines pre-start and post-stop event handlers, and says that processes will receive SIGTERM when the container needs to stop.
That seems insufficient to me. At a minimum I would add a pre-stop to allow more complicated shutdown procedures. E.g. clean shutdown of a database. moby/moby#6982 has a more extensive list of hooks that has been requested for Docker.
The text was updated successfully, but these errors were encountered: