diff options
author | Aravinda VK <avishwan@redhat.com> | 2016-06-03 13:07:24 +0530 |
---|---|---|
committer | Aravinda VK <avishwan@redhat.com> | 2016-06-05 23:50:50 -0700 |
commit | 88d19dfd60fc705375abc8e739b50db111a65a48 (patch) | |
tree | f347076af108121389280825d693b3bab4daa81e | |
parent | bac2781a2d3f26d09fd5687fd519b4cb4bdba1f4 (diff) |
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 <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/14637
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
-rw-r--r-- | geo-replication/syncdaemon/gsyncd.py | 12 |
1 files changed, 12 insertions, 0 deletions
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') |