glusterfs service: Switch to simple unit instead of forking.
Gluster's pidfile handling is bug-ridden.
I have fixed https://bugzilla.redhat.com/show_bug.cgi?id=1509340
in an attempt to improve it but that is far from enough.
The gluster developers describe another pidfile issue as
"our brick-process management is a total nightmare", see
https://github.com/gluster/glusterfs/blob/f1071f17e02502c24375c0b480d369d37f4e4054/xlators/mgmt/glusterd/src/glusterd-utils.c#L5907-L5924
I have observed multiple cases where glusterd doesn't start correctly
and systemd doesn't notice because of the erroneous pidfile handling.
To improve the situation, we don't let glusterd daemonize itself any more
and instead use `--no-daemon` and the `Simple` service type.
commit92f40bab2b9a437cdfb1f8fedd500699b5eda92b
authorNiklas Hambüchen <mail@nh2.me>
dateFri 29 Dec 2017, 22:54 (9 years ago)
parent3fc7d5e
nixos/modules/services/network-filesystems/glusterfs.nix+1−3
@@ -176,10 +176,8 @@ in
176176 '';
177177
178178 serviceConfig = {
179− Type="forking";
180− PIDFile="/run/glusterd.pid";
181179 LimitNOFILE=65536;
182− ExecStart="${glusterfs}/sbin/glusterd -p /run/glusterd.pid --log-level=${cfg.logLevel} ${toString cfg.extraFlags}";
180+ ExecStart="${glusterfs}/sbin/glusterd --no-daemon --log-level=${cfg.logLevel} ${toString cfg.extraFlags}";
183181 KillMode=cfg.killMode;
184182 TimeoutStopSec=cfg.stopKillTimeout;
185183 };