summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/utils/syncdaemon/repce.py
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2011-02-15 18:01:54 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-02-15 21:44:56 -0800
commit43b68bb25c9ee16c10342ef643a6ecb82a345e16 (patch)
tree9ef054106f742d52052da6a9fc621cfd10fd1ee5 /xlators/features/marker/utils/syncdaemon/repce.py
parent8ce08eb78165c9107925f23ac3057ee2cc01ff2f (diff)
syncdaemon: fix RePCe version query
RepceClient.repce_version fetched its own RePCe version, instead of querying peer, so lame. Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2381 (RePCe versioning) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2381
Diffstat (limited to 'xlators/features/marker/utils/syncdaemon/repce.py')
-rw-r--r--xlators/features/marker/utils/syncdaemon/repce.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/repce.py b/xlators/features/marker/utils/syncdaemon/repce.py
index aebc8b7d8..1b8d0203c 100644
--- a/xlators/features/marker/utils/syncdaemon/repce.py
+++ b/xlators/features/marker/utils/syncdaemon/repce.py
@@ -65,12 +65,15 @@ class RepceServer(object):
rid = in_data[0]
rmeth = in_data[1]
exc = False
- try:
- res = getattr(self.obj, rmeth)(*in_data[2:])
- except:
- res = sys.exc_info()[1]
- exc = True
- logging.exception("call failed: ")
+ if rmeth == '__repce_version__':
+ res = repce_version
+ else:
+ try:
+ res = getattr(self.obj, rmeth)(*in_data[2:])
+ except:
+ res = sys.exc_info()[1]
+ exc = True
+ logging.exception("call failed: ")
send(self.out, rid, exc, res)
@@ -151,7 +154,7 @@ class RepceClient(object):
return self.mprx(self, meth)
def __version__(self):
- d = {'proto': repce_version}
+ d = {'proto': self('__repce_version__')}
try:
d['object'] = self('version')
except AttributeError: