From 3ae22b61f9aa01f0a97f8f1b3ef75add74c02f7d Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Wed, 1 Jun 2016 12:42:30 +0530 Subject: glusterd/snapshot: Fix snapshot creation with geo-rep 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 BUG: 1341474 Reviewed-on: http://review.gluster.org/14595 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Rajesh Joseph --- xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'xlators/mgmt/glusterd') 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) { -- cgit