-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
salt-minion restart causes all spawned daemons to die on centos7 (systemd) #22993
Comments
@jetpak, what is the output of |
the salt-master is at 2015.2.0rc2 and the salt-minions are at 2014.7.1-1.el7 here is the version report: salt --versions-report
msgpack-python: 0.4.4 On Thu, Apr 23, 2015 at 11:04 AM, Justin Findlay notifications@github.com
Jerome Park, Sr. DevOps Engineer |
@jetpak, thanks for the report. |
@jetpak, will you tell me how and what daemon processes you're creating with the minion? Thanks. |
we use a real variety of servers and server clusters: solr, hadoop, mongo, some are started and become daemons themselves, some are invoked with in all cases, these daemons have a ppid of 1 i have tried (unsuccessfully) the idiom of starting daemons like restarting systemd - is truly a weird beast... On Thu, Apr 23, 2015 at 12:44 PM, Justin Findlay notifications@github.com
Jerome Park, Sr. DevOps Engineer |
@jetpak, I can agree with you there. :-) |
@jetpak: Do I understand this correctly: you're using a |
correct, cmd.run combined with nohup + & On Sat, Apr 25, 2015 at 4:19 AM, Elias Probst notifications@github.com
Jerome Park, Sr. DevOps Engineer |
@jetpak Ok, please don't do this - that's not how services are supposed to be spawned and controlled.
Just do this:
|
I changed the service file to this. and It will fix it just now.
|
@stduolc i would recommend you remove i would first look into running any long running scripts/processes correctly with systemd. Any transient service can be executed via |
Symptom: restart (or stop) of salt-minion on my systemd-based centos 7 box caused all my daemon processes that were started by the salt-minion to also be killed
Cause: looks like this is related to how systemd kills off all processes in the "control-group" of a service "unit" - in this case the salt-minion service
Suggested fix: change the [Service] section for /usr/lib/systemd/system/salt-minion.service to add:
KillMode=process
which, i believe, means when shutting down salt-minion, only send the kill signal to the salt-minion process itself - leave other spawned daemon processes alone
this fixed the issue for us
The text was updated successfully, but these errors were encountered: