Skip to content

Commit

Permalink
glusterfs: Fix glusterfind's crawlers dlopen() error.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nh2 committed Sep 8, 2017
1 parent e7325f8 commit abc96aa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkgs/tools/filesystems/glusterfs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit abc96aa

Please sign in to comment.