summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2016-06-01 12:42:30 +0530
committerRajesh Joseph <rjoseph@redhat.com>2016-06-01 22:50:47 -0700
commit3bd5c5858fd3df42374934ac8251a8620e6b62b9 (patch)
tree2f878b96b85674df5c6e543a92e2111e7b2e111a
parent4d73205fee5bf99527c78ef6838b14e3a2fdd4e3 (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: 1341478 Reviewed-on: http://review.gluster.org/14597 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.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>
-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 e57779caed7..1f3f34ab901 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
@@ -3533,6 +3533,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);
@@ -3549,12 +3552,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) {