summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2014-10-21 09:38:09 +0200
committerNiels de Vos <ndevos@redhat.com>2014-10-21 08:38:18 -0700
commit6b6ee3bce4b2fcb2cbfd06ab0a199d7aac4b7cec (patch)
tree59a4a529516912c038d0689e1684bfa774f7fc62 /xlators/mgmt/glusterd/src
parentb0ed286e9b53c5ad24f04686cd6ddfad940b87f3 (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. Cherry picked from commit 430b874c4f1a171c106a9e1e6507e14e79805a1d: > 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> Change-Id: I8e7d1f294904081137c23f3446261329d0d13bba BUG: 1149857 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/8953 Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-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 fdf4a1c993d..0aa8e5db0e8 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -1348,6 +1348,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};
@@ -1444,6 +1445,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");