Closed alexkross closed 6 years ago
Hi, and thanks for the PR! What happens on systems without Systemd e.g. Ubuntu 14.04 when forking is disabled?
Problem is not distribution specific, but directly related to how mongod is assumed to be started according to this role. So Ubuntu/Debian, as well as other systemd-based distros, probably also affected.
I think we should add a detection if Systemd is actually running on the host or not. Without forking a SysV init system would block at start time imo.
I have created this PR: https://github.com/Graylog2/graylog-ansible-role/pull/87 With these changes MongoDB was installed successfully on CentOS7 with
SELINUX=enforcing
SELINUXTYPE=targeted
Regression tested with Ubuntu 16.04 and Debian 8
Couls someone please test the changes so that we can merge them?
Closing in favour of https://github.com/Graylog2/graylog-ansible-role/pull/87#issuecomment-378901786
Issue and solution: https://serverfault.com/a/867472
More explanation here: https://askubuntu.com/a/787431 (quotation below)
"... mongod is completely unnecessarily forking. Because it is forking, systemd is thinking that the main dæmon process has exited unexpectedly, and it is cleaning up the service back to its stopped state. It does this by explicitly terminating all of the child processes left around by the service. Hence the signal.
This is a readiness protocol mismatch. MongoDB does not speak the forking readiness protocol, and it is not correct to change the systemd service unit to say that it does. It is, rather, correct to change the configuration of MongoDB so that it does not completely unnecessarily fork."