Skip to content

nomad job stop sends interrupt signal for docker driver? #8932

Closed
@jf

Description

Nomad version

Nomad v0.13.0-dev (fb170f37a05d712e3046d604c362804c7934cfc9+CHANGES)

Operating system and Environment details

Ubuntu 20.04.1 LTS

Issue

Reproduction steps

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

func (h *taskHandle) Kill(killTimeout time.Duration, signal os.Signal) error {

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

Job file (if appropriate)

any standard job file will do; you can use the example file from nomad job init too

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions