summaryrefslogtreecommitdiffstats
path: root/api/src
diff options
context:
space:
mode:
authorNithin D <nithind1988@yahoo.in>2016-02-28 21:45:48 +0530
committerAtin Mukherjee <amukherj@redhat.com>2016-03-21 10:52:50 -0700
commitb33f3c95ec9c8112e6677e09cea05c4c462040d0 (patch)
tree969d994858a49fc3d2fa32ff68b5e71909045918 /api/src
parent3e5445ae7d1dbbcc138374b6d2e5f95ffc556f4b (diff)
glusterd: Bug fixes for IPv6 support
Backport of http://review.gluster.org/#/c/11988/ Problem: Glusterd not working using ipv6 transport. The idea is with proper glusterd.vol configuration, 1. glusterd needs to listen on default port (240007) as IPv6 TCP listner. 2. Volume creation/deletion/mounting/add-bricks/delete-bricks/peer-probe needs to work using ipv6 addresses. 3. Bricks needs to listen on ipv6 addresses. All the above functionality is needed to say that glusterd supports ipv6 transport and this is broken. Fix: When "option transport.address-family inet6" option is present in glusterd.vol file, it is made sure that glusterd creates listeners using ipv6 sockets only and also the same information is saved inside brick volume files used by glusterfsd brick process when they are starting. Tests Run: Regression tests using ./run-tests.sh IPv4: Regression tests using ./run-tests.sh for release-3.7 branch verified by comparing with clean repo. IPv6: (Need to add the above mentioned config and also add an entry for "hostname ::1" in /etc/hosts) Started failing at ./tests/basic/glusterd/arbiter-volume-probe.t and ran successfully till here Change-Id: Idd7513aa2347ce0de2b1f68daeecce1b7a39a7af BUG: 1310445 Signed-off-by: Nithin D <nithind1988@yahoo.in> Reviewed-on: http://review.gluster.org/13787 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'api/src')
-rw-r--r--api/src/glfs-mgmt.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/api/src/glfs-mgmt.c b/api/src/glfs-mgmt.c
index ba1f4599488..107820c2a6d 100644
--- a/api/src/glfs-mgmt.c
+++ b/api/src/glfs-mgmt.c
@@ -718,6 +718,7 @@ mgmt_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event,
rpc_transport_t *rpc_trans = NULL;
struct glfs *fs = NULL;
int ret = 0;
+ struct dnscache6 *dnscache = NULL;
this = mydata;
rpc_trans = rpc->conn.trans;
@@ -736,6 +737,17 @@ mgmt_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event,
"failed to connect with remote-host: %s (%s)",
ctx->cmd_args.volfile_server,
strerror (errno));
+
+ if (!rpc->disabled) {
+ /*
+ * Check if dnscache is exhausted for current server
+ * and continue until cache is exhausted
+ */
+ dnscache = rpc_trans->dnscache;
+ if (dnscache && dnscache->next) {
+ break;
+ }
+ }
server = ctx->cmd_args.curr_server;
if (server->list.next == &ctx->cmd_args.volfile_servers) {
errno = ENOTCONN;