From 93129e862a2dde291ddbf22fe30d955b25da6059 Mon Sep 17 00:00:00 2001 From: Aravinda VK Date: Thu, 8 May 2014 16:54:00 +0530 Subject: geo-rep: Loading libgfchangelog.so only while running geo-rep In source install, libgfchangelog is installed in /usr/local/lib When glusterd runs /usr/local/libexec/glusterfs/python/gsyncd --version it fails to find library without LD_LIBRARY_PATH. This patch avoids loading library when it is run from glusterd during start. BUG: 1096026 Change-Id: I59912227ac27ff4877d947a7c8f1fe2e8c5be06e Signed-off-by: Aravinda VK Reviewed-on: http://review.gluster.org/7713 Reviewed-by: Kotresh HR Reviewed-by: Venky Shankar Tested-by: Venky Shankar --- geo-replication/syncdaemon/libgfchangelog.py | 5 +---- geo-replication/syncdaemon/resource.py | 2 +- geo-replication/syncdaemon/syncdutils.py | 4 ++++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/geo-replication/syncdaemon/libgfchangelog.py b/geo-replication/syncdaemon/libgfchangelog.py index 0fa32a73499..099867a511a 100644 --- a/geo-replication/syncdaemon/libgfchangelog.py +++ b/geo-replication/syncdaemon/libgfchangelog.py @@ -11,10 +11,7 @@ import os from ctypes import CDLL, create_string_buffer, get_errno from ctypes.util import find_library - - -class ChangelogException(OSError): - pass +from syncdutils import ChangelogException class Changes(object): diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py index aaf257e9c71..f0f6692cae2 100644 --- a/geo-replication/syncdaemon/resource.py +++ b/geo-replication/syncdaemon/resource.py @@ -34,7 +34,7 @@ import syncdutils from syncdutils import GsyncdError, select, privileged, boolify, funcode from syncdutils import umask, entry2pb, gauxpfx, errno_wrap, lstat from syncdutils import NoPurgeTimeAvailable, PartialHistoryAvailable -from libgfchangelog import ChangelogException +from syncdutils import ChangelogException UrlRX = re.compile('\A(\w+)://([^ *?[]*)\Z') HostRX = re.compile('[a-z\d](?:[a-z\d.-]*[a-z\d])?', re.I) diff --git a/geo-replication/syncdaemon/syncdutils.py b/geo-replication/syncdaemon/syncdutils.py index d4ded39f562..65daeb0fe7c 100644 --- a/geo-replication/syncdaemon/syncdutils.py +++ b/geo-replication/syncdaemon/syncdutils.py @@ -496,3 +496,7 @@ class NoPurgeTimeAvailable(Exception): class PartialHistoryAvailable(Exception): pass + + +class ChangelogException(OSError): + pass -- cgit