diff options
author | Niklas Hambüchen <mail@nh2.me> | 2017-12-29 22:54:50 +0100 |
---|---|---|
committer | Niklas Hambüchen <mail@nh2.me> | 2018-11-04 11:09:30 +0100 |
commit | 92f40bab2b9a437cdfb1f8fedd500699b5eda92b (patch) | |
tree | 603ca6264beafb0e9ba6ec7d805ad245226ad1e0 | |
parent | 3fc7d5eb83804e10ae55b1ae9b102f88b1ea2b08 (diff) | |
download | nixlib-92f40bab2b9a437cdfb1f8fedd500699b5eda92b.tar nixlib-92f40bab2b9a437cdfb1f8fedd500699b5eda92b.tar.gz nixlib-92f40bab2b9a437cdfb1f8fedd500699b5eda92b.tar.bz2 nixlib-92f40bab2b9a437cdfb1f8fedd500699b5eda92b.tar.lz nixlib-92f40bab2b9a437cdfb1f8fedd500699b5eda92b.tar.xz nixlib-92f40bab2b9a437cdfb1f8fedd500699b5eda92b.tar.zst nixlib-92f40bab2b9a437cdfb1f8fedd500699b5eda92b.zip |
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.
-rw-r--r-- | nixos/modules/services/network-filesystems/glusterfs.nix | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/nixos/modules/services/network-filesystems/glusterfs.nix b/nixos/modules/services/network-filesystems/glusterfs.nix index 8ac9f801dcb8..5be10535f5bf 100644 --- a/nixos/modules/services/network-filesystems/glusterfs.nix +++ b/nixos/modules/services/network-filesystems/glusterfs.nix @@ -176,10 +176,8 @@ in ''; serviceConfig = { - Type="forking"; - PIDFile="/run/glusterd.pid"; LimitNOFILE=65536; - ExecStart="${glusterfs}/sbin/glusterd -p /run/glusterd.pid --log-level=${cfg.logLevel} ${toString cfg.extraFlags}"; + ExecStart="${glusterfs}/sbin/glusterd --no-daemon --log-level=${cfg.logLevel} ${toString cfg.extraFlags}"; KillMode=cfg.killMode; TimeoutStopSec=cfg.stopKillTimeout; }; |