From 88d19dfd60fc705375abc8e739b50db111a65a48 Mon Sep 17 00:00:00 2001 From: Aravinda VK Date: Fri, 3 Jun 2016 13:07:24 +0530 Subject: geo-rep: Fix volume stop with geo-rep session Backport of http://review.gluster.org/14636 The slave volume uuid is appended to slave_url which is saved in 'gsync_slaves' dictionary with the commit "http://review.gluster.org/13111". But the gsyncd expects slave_url with out slave volume uuid otherwise it fails which in turn fails volume stop with geo-rep. This patch fixes the same. Change-Id: I036f4fce43115ff848daebfe1b2c58765cffab5a BUG: 1342431 Signed-off-by: Kotresh HR Reviewed-on: http://review.gluster.org/14637 NetBSD-regression: NetBSD Build System Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: Aravinda VK --- geo-replication/syncdaemon/gsyncd.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'geo-replication') diff --git a/geo-replication/syncdaemon/gsyncd.py b/geo-replication/syncdaemon/gsyncd.py index 1667e97b245..da5de0f40f8 100644 --- a/geo-replication/syncdaemon/gsyncd.py +++ b/geo-replication/syncdaemon/gsyncd.py @@ -411,6 +411,18 @@ def main_i(): # the parser with virgin values container. defaults = op.get_default_values() opts, args = op.parse_args(values=optparse.Values()) + # slave url cleanup, if input comes with vol uuid as follows + # 'ssh://fvm1::gv2:07dfddca-94bb-4841-a051-a7e582811467' + temp_args = [] + for arg in args: + # Split based on :: + data = arg.split("::") + if len(data)>1: + slavevol_name = data[1].split(":")[0] + temp_args.append("%s::%s" % (data[0], slavevol_name)) + else: + temp_args.append(data[0]) + args = temp_args args_orig = args[:] voluuid_get = rconf.get('slavevoluuid_get') -- cgit