Ask questions`nomad job stop` sends `interrupt` signal for docker driver?
Nomad v0.13.0-dev (fb170f37a05d712e3046d604c362804c7934cfc9+CHANGES)
Ubuntu 20.04.1 LTS
Not too sure why nobody has noticed, but it seems like nomad job stop sends a docker task the interrupt signal, as opposed to the expected TERM as per https://www.nomadproject.io/docs/job-specification/task#kill_signal
To confirm this, I basically added debug logging to https://github.com/hashicorp/nomad/blob/943854469db945631e79ccd0f8014cdb1e584963/drivers/docker/handle.go#L127
My debug output for the signal parameter gives interrupt.
My first clue was from my alloc logs, where I see 'Sent interrupt'. The line from nomad job stop is called out below
Time Type Description
2020-09-19T10:50:04Z Killing Sent interrupt. Waiting 30s before force killing
2020-09-19T10:50:04Z Killed Task successfully killed
2020-09-19T10:50:04Z Terminated Exit Code: 1, Exit Message: "Docker container exited with non-zero exit code: 1"
2020-09-19T10:50:02Z Killing Sent interrupt. Waiting 30s before force killing --> did `nomad job stop` here
2020-09-19T10:45:51Z Started Task started by client
2020-09-19T10:45:37Z Driver Downloading image
2020-09-19T10:45:37Z Task Setup Building Task Directory
2020-09-19T10:45:34Z Received Task received by client
any standard job file will do; you can use the example file from nomad job init too
Answer
questions
jf
Sure. I just had the impression (as I believe most folks would as well) from the docs (https://www.nomadproject.io/docs/job-specification/task#kill_signal) that my tasks would be getting TERM instead of KILL
Related questions