summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);