summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorMilind Changire <mchangir@redhat.com>2019-01-22 12:10:59 +0530
committerAmar Tumballi <amarts@redhat.com>2019-01-22 13:47:19 +0000
commitb6c417785e54620331ae35d6971fe8bef98b4619 (patch)
tree828099423d2cc2cfee056b0431ebd54a205d533f /xlators/features
parent67bc3775685198b9ab10c1f2a0d957b157bb4acd (diff)
rpc: use address-family option from vol file
This patch helps enable IPv6 connections in the cluster. The default address-family is IPv4 without using this option explicitly. When address-family is set to "inet6" in the /etc/glusterfs/glusterd.vol file, the mount command-line also needs to have -o xlator-option="transport.address-family=inet6" added to it. This option also gets added to the brick command-line. Snapshot and gfapi use-cases should also use this option to pass in the inet6 address-family. Change-Id: I97db91021af27bacb6d7578e33ea4817f66d7270 fixes: bz#1635863 Signed-off-by: Milind Changire <mchangir@redhat.com>
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/snapview-server/src/snapview-server-mgmt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/features/snapview-server/src/snapview-server-mgmt.c b/xlators/features/snapview-server/src/snapview-server-mgmt.c
index 8e23b9adb2e..b608cdfcd44 100644
--- a/xlators/features/snapview-server/src/snapview-server-mgmt.c
+++ b/xlators/features/snapview-server/src/snapview-server-mgmt.c
@@ -86,6 +86,7 @@ svs_mgmt_init(xlator_t *this)
char *host = NULL;
cmd_args_t *cmd_args = NULL;
glusterfs_ctx_t *ctx = NULL;
+ xlator_cmdline_option_t *opt = NULL;
GF_VALIDATE_OR_GOTO("snapview-server", this, out);
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
@@ -100,7 +101,9 @@ svs_mgmt_init(xlator_t *this)
if (cmd_args->volfile_server)
host = cmd_args->volfile_server;
- ret = rpc_transport_inet_options_build(&options, host, port);
+ opt = find_xlator_option_in_cmd_args_t("address-family", cmd_args);
+ ret = rpc_transport_inet_options_build(&options, host, port,
+ (opt != NULL ? opt->value : NULL));
if (ret) {
gf_msg(this->name, GF_LOG_ERROR, 0, SVS_MSG_BUILD_TRNSPRT_OPT_FAILED,
"failed to build the "