summaryrefslogtreecommitdiffstats
path: root/glusterfsd/src/glusterfsd-mgmt.c
diff options
context:
space:
mode:
authorKevin Vigor <kvigor@fb.com>2017-01-05 12:21:20 -0800
committerKevin Vigor <kvigor@fb.com>2017-01-05 12:21:20 -0800
commitc27aa58e72cf528583c585691e65abdb765535e5 (patch)
treefae75e5b924ac4fb80a3d4ed42203638732fbb52 /glusterfsd/src/glusterfsd-mgmt.c
parent63403742f53ec59a6acbe26ff4c39bab1b0842ed (diff)
parentcb8bc3396d16e777d9a2683886fefd43e747e8a3 (diff)
Merge remote-tracking branch 'origin/release-3.8' into merge-3.8-again
Change-Id: I844adf2aef161a44d446f8cd9b7ebcb224ee618a Signed-off-by: Kevin Vigor <kvigor@fb.com>
Diffstat (limited to 'glusterfsd/src/glusterfsd-mgmt.c')
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index ea6d3ff7225..556b82742cb 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -1321,10 +1321,14 @@ glusterfs_handle_barrier (rpcsvc_request_t *req)
req->rpc_err = GARBAGE_ARGS;
goto out;
}
+ ret = -1;
ctx = glusterfsd_ctx;
- GF_ASSERT (ctx);
+ GF_VALIDATE_OR_GOTO (THIS->name, ctx, out);
+
active = ctx->active;
+ GF_VALIDATE_OR_GOTO (THIS->name, active, out);
+
any = active->first;
dict = dict_new();
@@ -1889,6 +1893,8 @@ mgmt_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event,
rpc_transport_t *rpc_trans = NULL;
int need_term = 0;
int emval = 0;
+ static int log_ctr1;
+ static int log_ctr2;
struct dnscache6 *dnscache = NULL;
this = mydata;
@@ -1900,11 +1906,11 @@ mgmt_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event,
ctx->cmd_args.connect_attempts++;
gf_log ("glusterfsd-mgmt", GF_LOG_ERROR,
- "Connect attempt with remote-host: %s (%u/%d)",
+ "Connect attempt with remote-host: %s (%s) (%u/%d)",
ctx->cmd_args.volfile_server,
+ strerror (errno),
ctx->cmd_args.connect_attempts,
ctx->cmd_args.max_connect_attempts);
-
if (!rpc->disabled) {
/*
* Check if dnscache is exhausted for current server
@@ -1926,8 +1932,9 @@ mgmt_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event,
if (!ctx->active)
need_term = 1;
emval = ENOTCONN;
- gf_log("glusterfsd-mgmt", GF_LOG_INFO,
- "Exhausted all volfile servers");
+ GF_LOG_OCCASIONALLY (log_ctr2, "glusterfsd-mgmt",
+ GF_LOG_INFO,
+ "Exhausted all volfile servers");
break;
}