summary refs log tree commit diff
path: root/pkgs/tools/filesystems/glusterfs/default.nix
diff options
context:
space:
mode:
authorNiklas Hambüchen <mail@nh2.me>2017-09-08 04:19:59 +0200
committerNiklas Hambüchen <mail@nh2.me>2017-09-08 04:29:20 +0200
commitabc96aae47d5651f0f1d0b5da7bfcf163a3e7c9f (patch)
tree76c93bad46b3862db8c1175e998195ad417b149d /pkgs/tools/filesystems/glusterfs/default.nix
parente7325f82a32cea8d7e6cfafff9e61e4468fd19dc (diff)
downloadnixpkgs-abc96aae47d5651f0f1d0b5da7bfcf163a3e7c9f.tar
nixpkgs-abc96aae47d5651f0f1d0b5da7bfcf163a3e7c9f.tar.gz
nixpkgs-abc96aae47d5651f0f1d0b5da7bfcf163a3e7c9f.tar.bz2
nixpkgs-abc96aae47d5651f0f1d0b5da7bfcf163a3e7c9f.tar.lz
nixpkgs-abc96aae47d5651f0f1d0b5da7bfcf163a3e7c9f.tar.xz
nixpkgs-abc96aae47d5651f0f1d0b5da7bfcf163a3e7c9f.tar.zst
nixpkgs-abc96aae47d5651f0f1d0b5da7bfcf163a3e7c9f.zip
glusterfs: Fix glusterfind's crawlers dlopen() error.
This fixes:

  Traceback (most recent call last):
    File "/nix/store/7f9arl3f9xyj8sm05mkanh2mlp217192-glusterfs-3.10.2/libexec/glusterfs/glusterfind/changelog.py", line 22, in <module>
      import libgfchangelog
    File "/nix/store/7f9arl3f9xyj8sm05mkanh2mlp217192-glusterfs-3.10.2/libexec/glusterfs/glusterfind/libgfchangelog.py", line 21, in <module>
      libgfc = CDLL("libgfchangelog.so", use_errno=True, mode=RTLD_GLOBAL)
    File "/nix/store/nlyr5ankhi7yvva8zndi718zj37js270-python-2.7.13-env/lib/python2.7/ctypes/__init__.py", line 362, in __init__
      self._handle = _dlopen(self._name, mode)
  OSError: libgfchangelog.so: cannot open shared object file: No such file or directory
  Connection to 10.0.0.2 closed.

when running `glusterfind pre`.

Done by setting PYTHONPATH/LD_LIBRARY_PATH as for the other
Python scripts.
Diffstat (limited to 'pkgs/tools/filesystems/glusterfs/default.nix')
-rw-r--r--pkgs/tools/filesystems/glusterfs/default.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/tools/filesystems/glusterfs/default.nix b/pkgs/tools/filesystems/glusterfs/default.nix
index 6d9cd33f86e..0bdb7413f22 100644
--- a/pkgs/tools/filesystems/glusterfs/default.nix
+++ b/pkgs/tools/filesystems/glusterfs/default.nix
@@ -139,8 +139,14 @@ rec {
     # Luckily, `libexec` scripts are never supposed to be invoked straight from PATH,
     # instead they are invoked directly from `gluster` or `glusterd`, which is why it is
     # sufficient to set PYTHONPATH for those executables.
+    #
+    # Exceptions to these rules are the `glusterfind` `brickfind.py` and `changelog.py`
+    # crawlers, which are directly invoked on other gluster nodes using a remote SSH command
+    # issues by `glusterfind`.
 
     wrapProgram $out/share/glusterfs/scripts/eventsdash.py --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
+    wrapProgram $out/libexec/glusterfs/glusterfind/brickfind.py --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
+    wrapProgram $out/libexec/glusterfs/glusterfind/changelog.py --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
     '';
 
   doInstallCheck = true;