From bbb8313568bd0725f9faf1927ccefe79126a2113 Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Wed, 21 May 2014 11:54:24 +0530 Subject: gsyncd / geo-rep: fix cli query for volinfo fetch With an unprivileged geo-replication session, monitor was using user@slave for --remote-host option for gluster cli, thereby failing to sucessfully connect to the slave glusterd. This patch fixes the issue by selecting the hostname/IP from the speicified slave endpoint url. - For privileged geo-replication sessions, this patch has no effect as the slave endpoint url is just the hostname/IP. Change-Id: I88f66c406a8d9a34db7fc626965f949075e3ceac BUG: 1077452 Signed-off-by: Venky Shankar Reviewed-on: http://review.gluster.org/7818 Reviewed-by: Aravinda VK Reviewed-by: Kotresh HR Tested-by: Gluster Build System --- geo-replication/syncdaemon/monitor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geo-replication/syncdaemon/monitor.py b/geo-replication/syncdaemon/monitor.py index 0c90997880f..f485fe18605 100644 --- a/geo-replication/syncdaemon/monitor.py +++ b/geo-replication/syncdaemon/monitor.py @@ -267,7 +267,7 @@ def distribute(*resources): sbricks = {'host': 'localhost', 'dir': si.path} suuid = uuid.uuid5(uuid.NAMESPACE_URL, slave.get_url(canonical=True)) elif isinstance(si, GLUSTER): - svol = Volinfo(si.volume, slave.remote_addr) + svol = Volinfo(si.volume, slave.remote_addr.split('@')[-1]) sbricks = svol.bricks suuid = svol.uuid else: -- cgit