summaryrefslogtreecommitdiffstats
path: root/glusterfsd/src
diff options
context:
space:
mode:
authorKevin Vigor <kvigor@fb.com>2017-01-06 14:34:27 -0800
committerKevin Vigor <kvigor@fb.com>2017-01-06 16:13:26 -0800
commitc5145b464e6ebc77021fe4ebef4aaf8312a323aa (patch)
tree4e1e085cae37c928ccb4576ecd92a285c60ed0a7 /glusterfsd/src
parent0706095ec443853050de970a76ccb2e713a2ab33 (diff)
Repair more cluster tests in FB IPv6 environment
Summary: 'transport.address-family' option is not universally supported, which leads to woe using the IPV4 only cluster tests in FB IPv6 default build. Two fixes here: first, pass transport.address-family to brick deamons on startup; and second, honor the option when attaching to management deamon. Test Plan: ./tests/basic/mgmt_v3-locks.t in FB environment. Previously failed every time, now succeeds Reviewers: Subscribers: Tasks: Blame Revision: Change-Id: I2918004ff9f9d962d10684e3d3d0783eae6cb838 Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: http://review.gluster.org/16353 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com>
Diffstat (limited to 'glusterfsd/src')
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index 556b82742cb..a7c96d1e7a0 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -2140,6 +2140,7 @@ glusterfs_mgmt_init (glusterfs_ctx_t *ctx)
int ret = -1;
int port = GF_DEFAULT_BASE_PORT;
char *host = NULL;
+ char *addr_family = NULL;
cmd_args = &ctx->cmd_args;
GF_VALIDATE_OR_GOTO (THIS->name, cmd_args->volfile_server, out);
@@ -2156,8 +2157,19 @@ glusterfs_mgmt_init (glusterfs_ctx_t *ctx)
!strcmp (cmd_args->volfile_server_transport, "unix")) {
ret = rpc_transport_unix_options_build (&options, host, 0);
} else {
+ xlator_cmdline_option_t *cmd_option = NULL;
+
+ list_for_each_entry (cmd_option,
+ &cmd_args->xlator_options, cmd_args) {
+ if (!strcmp(cmd_option->key,
+ "transport.address-family")) {
+ addr_family = cmd_option->value;
+ break;
+ }
+ }
+
ret = rpc_transport_inet_options_build (&options, host, port,
- NULL);
+ addr_family);
}
if (ret)
goto out;