summary refs log tree commit diff
path: root/nixos/modules/services/network-filesystems
diff options
context:
space:
mode:
authorNiklas Hambüchen <mail@nh2.me>2017-09-07 10:35:00 +0200
committerNiklas Hambüchen <mail@nh2.me>2017-09-07 10:38:52 +0200
commit5bc38fc0893e6d04d09ccb3722cdd5edb3bd57ec (patch)
treee0e1ae70e290974f76f1127aef710713d8547430 /nixos/modules/services/network-filesystems
parent51eafbe028d5daf4bfb23db2e60bed1d1b689862 (diff)
downloadnixlib-5bc38fc0893e6d04d09ccb3722cdd5edb3bd57ec.tar
nixlib-5bc38fc0893e6d04d09ccb3722cdd5edb3bd57ec.tar.gz
nixlib-5bc38fc0893e6d04d09ccb3722cdd5edb3bd57ec.tar.bz2
nixlib-5bc38fc0893e6d04d09ccb3722cdd5edb3bd57ec.tar.lz
nixlib-5bc38fc0893e6d04d09ccb3722cdd5edb3bd57ec.tar.xz
nixlib-5bc38fc0893e6d04d09ccb3722cdd5edb3bd57ec.tar.zst
nixlib-5bc38fc0893e6d04d09ccb3722cdd5edb3bd57ec.zip
glusterfs service: Ensure dirs needed by `glusterfind` exist
Diffstat (limited to 'nixos/modules/services/network-filesystems')
-rw-r--r--nixos/modules/services/network-filesystems/glusterfs.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/nixos/modules/services/network-filesystems/glusterfs.nix b/nixos/modules/services/network-filesystems/glusterfs.nix
index f7fed793066a..7454eeef803f 100644
--- a/nixos/modules/services/network-filesystems/glusterfs.nix
+++ b/nixos/modules/services/network-filesystems/glusterfs.nix
@@ -50,11 +50,19 @@ 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
+      ''
+      # The copying of hooks is due to upstream bug https://bugzilla.redhat.com/show_bug.cgi?id=1452761
+      + ''
         mkdir -p /var/lib/glusterd/hooks/
         ${rsync}/bin/rsync -a ${glusterfs}/var/lib/glusterd/hooks/ /var/lib/glusterd/hooks/
+      ''
+      # `glusterfind` needs dirs that upstream installs at `make install` phase
+      # https://github.com/gluster/glusterfs/blob/v3.10.2/tools/glusterfind/Makefile.am#L16-L17
+      + ''
+        mkdir -p /var/lib/glusterd/glusterfind/.keys
+        mkdir -p /var/lib/glusterd/hooks/1/delete/post/
       '';
 
       serviceConfig = {