diff options
author | Aravinda VK <avishwan@redhat.com> | 2016-06-03 13:07:24 +0530 |
---|---|---|
committer | Aravinda VK <avishwan@redhat.com> | 2016-06-03 11:03:52 -0700 |
commit | 42b2c259658b017ec08ecf419c7ea83112779236 (patch) | |
tree | c7acdff9091974375aad3fa543d62b4d0732c71a /geo-replication/syncdaemon | |
parent | 0556ac5c0ded2eb942096268b8b94f30e9af10e0 (diff) |
geo-rep: Fix volume stop with geo-rep session
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: 1342420
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/14636
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon')
-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') |