summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2014-10-07 10:08:20 +0200
committerKrishnan Parthasarathi <kparthas@redhat.com>2014-10-08 21:10:08 -0700
commit430b874c4f1a171c106a9e1e6507e14e79805a1d (patch)
tree9076a38e04043cbf2dcd09a93f33c71f702a7843
parent678e91718c41b29046df7b9a019e4e9f7550efcb (diff)
glusterd: make bricks respect 'transport.socket.bind-address'
When GlusterD starts the brick processes, these will listen on all interfaces. When the 'transport.socket.bind-address' option is set in glusterd.vol, the brick processes should only listen on the specified hostname or IP-address. Change-Id: I8e7d1f294904081137c23f3446261329d0d13bba BUG: 1149863 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/8910 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index b0b7cfe8bca..8fd44a1f3f8 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -1848,6 +1848,7 @@ glusterd_volume_start_glusterfs (glusterd_volinfo_t *volinfo,
char logfile[PATH_MAX] = {0,};
int port = 0;
int rdma_port = 0;
+ char *bind_address = NULL;
char socketpath[PATH_MAX] = {0};
char glusterd_uuid[1024] = {0,};
char valgrind_logfile[PATH_MAX] = {0};
@@ -1960,6 +1961,13 @@ glusterd_volume_start_glusterfs (glusterd_volinfo_t *volinfo,
runner_argprintf (&runner, "%s-server.listen-port=%d",
volinfo->volname, port);
+ if (dict_get_str (this->options, "transport.socket.bind-address",
+ &bind_address) == 0) {
+ runner_add_arg (&runner, "--xlator-option");
+ runner_argprintf (&runner, "transport.socket.bind-address=%s",
+ bind_address);
+ }
+
if (volinfo->memory_accounting)
runner_add_arg (&runner, "--mem-accounting");