diff options
Diffstat (limited to 'api/src/glfs-mgmt.c')
| -rw-r--r-- | api/src/glfs-mgmt.c | 12 | 
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;  | 
