From 5bc38fc0893e6d04d09ccb3722cdd5edb3bd57ec Mon Sep 17 00:00:00 2001 From: Niklas Hambüchen Date: Thu, 7 Sep 2017 10:35:00 +0200 Subject: glusterfs service: Ensure dirs needed by `glusterfind` exist --- nixos/modules/services/network-filesystems/glusterfs.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'nixos/modules/services/network-filesystems') 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 = { -- cgit 1.4.1