diff options
author | Kotresh HR <khiremat@redhat.com> | 2016-06-01 12:42:30 +0530 |
---|---|---|
committer | Rajesh Joseph <rjoseph@redhat.com> | 2016-06-01 22:49:56 -0700 |
commit | 3ae22b61f9aa01f0a97f8f1b3ef75add74c02f7d (patch) | |
tree | 18a7bb8a4095296e9f0cc1348fe4c0ebd838758c /xlators | |
parent | e800c00df1474504032ead25a0bcbbc92c1d6fec (diff) |
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 <khiremat@redhat.com>
BUG: 1341474
Reviewed-on: http://review.gluster.org/14595
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.c | 6 |
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) { |