From ff4eb1eaa6693dbdee5e186f8c9832c11c51f9c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Sat, 13 May 2017 03:07:04 +0200 Subject: [PATCH] glusterfs service: Copy hooks to /var at startup. This is where glusterfs expects them; see also https://github.com/gluster/glusterfs/blob/v3.10.1/extras/hook-scripts/Makefile.am#L4 Also see upstream bug https://bugzilla.redhat.com/show_bug.cgi?id=1452761 --- nixos/modules/services/network-filesystems/glusterfs.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/network-filesystems/glusterfs.nix b/nixos/modules/services/network-filesystems/glusterfs.nix index a2f2c033951..f7fed793066 100644 --- a/nixos/modules/services/network-filesystems/glusterfs.nix +++ b/nixos/modules/services/network-filesystems/glusterfs.nix @@ -3,7 +3,7 @@ with lib; let - inherit (pkgs) glusterfs; + inherit (pkgs) glusterfs rsync; cfg = config.services.glusterfs; @@ -50,8 +50,11 @@ in after = [ "rpcbind.service" "network.target" "local-fs.target" ]; before = [ "network-online.target" ]; + # The copying of hooks is due to upstream bug https://bugzilla.redhat.com/show_bug.cgi?id=1452761 preStart = '' install -m 0755 -d /var/log/glusterfs + mkdir -p /var/lib/glusterd/hooks/ + ${rsync}/bin/rsync -a ${glusterfs}/var/lib/glusterd/hooks/ /var/lib/glusterd/hooks/ ''; serviceConfig = {