-
Notifications
You must be signed in to change notification settings - Fork 2k
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
nomad job stop
sends interrupt
signal for docker driver?
#8932
Comments
nomad job stop
sends signal interrupt for docker driver?nomad job stop
sends interrupt
signal for docker driver?
Thanks for reporting, and the PR, @jf! Let me see if I can reproduce this going back in Nomad versions - pretty sure the Docker driver was intended to use SIGTERM to behave more like the real |
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 |
I was able to confirm this hasn't worked as intended since at least Nomad v0.8.x. Given that fixing this is a change in behavior I think we should add a section in the version upgrade guide + call it out as a backwards incompatibility in the changelog. Also add some test(s). I'll go ahead and merge #8933 and then take care of the rest. |
Great, thank you @shoenig ! Would you mind tagging me when you do the other stuff? Especially for the tests, so I can learn and then hopefully take care of that for any future PRs. Thank you! |
Does this affect stopping allocations individually as well? |
I believe so. I dont see why stopping allocations would end up using another code path. Can you try it out and see if you encounter this as well? |
This PR adds a version specific upgrade note about the docker stop signal behavior. Also adds test for the signal logic in docker driver. Closes hashicorp#8932 which was fixed in hashicorp#8933
lifecycle: update e2e test for service job with new docker signal #8932
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
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_signalTo confirm this, I basically added debug logging to
nomad/drivers/docker/handle.go
Line 127 in 9438544
My debug output for the
signal
parameter givesinterrupt
.My first clue was from my alloc logs, where I see 'Sent interrupt'. The line from
nomad job stop
is called out belowJob file (if appropriate)
any standard job file will do; you can use the example file from
nomad job init
tooThe text was updated successfully, but these errors were encountered: