Skip to content
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

systemd unit file kills executors when nomad agent is stopped #4302

Closed
ramSeraph opened this issue May 16, 2018 · 6 comments
Closed

systemd unit file kills executors when nomad agent is stopped #4302

ramSeraph opened this issue May 16, 2018 · 6 comments
Labels
theme/config theme/docs Documentation issues and enhancements

Comments

@ramSeraph
Copy link

Nomad version

Nomad v0.8.3 (c85483d)

Operating system and Environment details

uname -a

Linux <hostname> 4.4.0-97-generic #120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

systemd --version

systemd 229
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN

Issue

restarting nomad agent on the host restarts the jobs on the host when nomad is running under systemd

Reproduction steps

systemctl stop nomad stops the running executors on the host

then if i do a systemctl start nomad, the reattachment attempt kills the existing containers as the corresponding executors are dead

@ramSeraph
Copy link
Author

adding KillMode=process to the systemd unit file below fixes the problem

https://github.com/hashicorp/nomad/blob/master/dist/systemd/nomad.service

documentation reference: https://www.freedesktop.org/software/systemd/man/systemd.kill.html#KillMode=

@preetapan
Copy link
Contributor

@ramSeraph Could you submit a PR for changing that sample config file? - this default makes sense

@preetapan preetapan added theme/config theme/docs Documentation issues and enhancements labels May 16, 2018
@insanejudge
Copy link
Contributor

insanejudge commented May 17, 2018

I considered doing the same (we're running Killmode=process) but this should have been addressed by #3572 , which places executors in their own process group.

edit: on a second read, i might be wrong about that.

@ramSeraph
Copy link
Author

@insanejudge thanks for the PR. I was offline and didn't see the response

@onlyjob
Copy link
Contributor

onlyjob commented Aug 14, 2018

FYI, #4305 (comment)

@github-actions
Copy link

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.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
theme/config theme/docs Documentation issues and enhancements
Projects
None yet
Development

No branches or pull requests

4 participants