summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorMohamed Ashiq Liyazudeen <mliyazud@redhat.com>2015-10-29 20:40:00 +0530
committerAtin Mukherjee <amukherj@redhat.com>2015-11-03 00:37:09 -0800
commit76eaae58654560d5a2cc72f3a2de5934801a27e9 (patch)
tree985c62f6c6ca19c218838dedc8432b1ec5dbf470 /xlators
parent1f74a3efbd0337759878ffff5cd4ee6782ddfe3f (diff)
glusterd : vol replace-brick fails when transport.socket.bind-address is set in glusterd
Change-Id: Id8c29aa46b526bc003a1d7023714b67805e35a99 BUG: 1276386 Signed-off-by: Mohamed Ashiq Liyazudeen <mliyazud@redhat.com> Signed-off-by: Humble Devassy Chirammal <hchiramm@redhat.com> Reviewed-on: http://review.gluster.org/12461 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-replace-brick.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
index 70ee7364536..4c59f0fe0f5 100644
--- a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
+++ b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
@@ -49,6 +49,7 @@ glusterd_handle_replicate_replace_brick (glusterd_volinfo_t *volinfo,
runner_t runner = {0};
glusterd_conf_t *priv = NULL;
char *pid = NULL;
+ char *volfileserver = NULL;
priv = THIS->private;
@@ -78,9 +79,13 @@ glusterd_handle_replicate_replace_brick (glusterd_volinfo_t *volinfo,
if (ret < 0)
goto out;
+ if (dict_get_str (THIS->options, "transport.socket.bind-address",
+ &volfileserver) != 0)
+ volfileserver = "localhost";
+
runinit (&runner);
runner_add_args (&runner, SBIN_DIR"/glusterfs",
- "-s", "localhost",
+ "-s", volfileserver,
"--volfile-id", volinfo->volname,
"--client-pid", pid,
"-l", logfile, tmpmount, NULL);