summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2016-06-01 12:42:30 +0530
committerRajesh Joseph <rjoseph@redhat.com>2016-06-02 22:42:16 -0700
commit7bc867c8f765fbfcaa25a8e280187ca518064835 (patch)
treecdd49549e6c0c8c2844831f1e296ab7d97fe55d9 /xlators
parent2e67cfe155d186455e46f2e5b9fd0eefad2a35b6 (diff)
glusterd/snapshot: Fix snapshot creation with geo-rep
Backport of http://review.gluster.org/#/c/14595 The construction of path to geo-rep session directory is broken with the commit "http://review.gluster.org/13111" as it saves the slave volume uuid in 'gsync_slaves' dictionary. This patch fixes the same. Change-Id: Ic7fc3c37d368549feb44b3a08d60157ce61227c3 Signed-off-by: Kotresh HR <khiremat@redhat.com> BUG: 1341944 Reviewed-on: http://review.gluster.org/14597 (cherry picked from commit 3bd5c5858fd3df42374934ac8251a8620e6b62b9) Reviewed-on: http://review.gluster.org/14611 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
index c67c9d752c6..46c8bad1aa9 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
@@ -3530,6 +3530,9 @@ glusterd_get_geo_rep_session (char *slave_key, char *origin_volname,
goto out;
}
+ /* geo-rep session string format being parsed:
+ * "master_node_uuid:ssh://slave_host::slave_vol:slave_voluuid"
+ */
token = strtok_r (temp, "/", &save_ptr);
token = strtok_r (NULL, ":", &save_ptr);
@@ -3546,12 +3549,11 @@ glusterd_get_geo_rep_session (char *slave_key, char *origin_volname,
}
ip_i = ip;
- token = strtok_r (NULL, "\0", &save_ptr);
+ token = strtok_r (NULL, ":", &save_ptr);
if (!token) {
ret = -1;
goto out;
}
- token++;
slave_temp = gf_strdup (token);
if (!slave) {