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