What's the recommended way to drain a node and shutdown all tasks on the node gracefully?


nomad node drain -enable -self -deadline 20s

seems to do is eventually force quit the tasks and not use the configured kill_signal. Will I need to drain the node and then individually loop through all allocations and send the proper signal with nomad alloc signal?


Hi @axsuul,

The node drain command is the recommended way to drain a node gracefully of all current work and mark it as ineligible for more work. The running allocations should be signalled to gracefully shutdown using the task kill_signal parameter. If they have not exited by the time the deadline is reached, then they will sent SIGKILL signal.

I do wonder if this PR and the linked issues describe the problem you are seeing? If so, this is something we are working on fixing.

jrasell and the Nomad team