diff options
author | Atin Mukherjee <amukherj@redhat.com> | 2017-06-09 17:10:00 +0530 |
---|---|---|
committer | Jeff Darcy <jeff@pl.atyp.us> | 2017-06-09 22:44:25 +0000 |
commit | 801697cc08928660a8087d08122a3aed622f6790 (patch) | |
tree | 3c78ec0d1f7c94de8ce508a9a8a3d99d199f1d60 /xlators/mgmt | |
parent | 5b82f173ba337b2fe06846c2a0e5f35d1ff53357 (diff) |
glusterd: log stale rpc disconnects occasionally
There might be situations where if a brick process is killed through
SIGKILL (not SIGTERM) when brick mux is enabled glusterd will continue to
receive disconnect events from the stale rpc which might flood the
glusterd log. Fix is to use GF_LOG_OCCASIONALLY.
Change-Id: I95a10c8be2346614e0a3458f98d9f99aab34800a
BUG: 1460225
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: https://review.gluster.org/17499
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handler.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index 65e963fa367..b86580f9f0b 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -5749,6 +5749,8 @@ out: return ret; } +static int gd_stale_rpc_disconnect_log; + int __glusterd_brick_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event, void *data) @@ -5833,9 +5835,10 @@ __glusterd_brick_rpc_notify (struct rpc_clnt *rpc, void *mydata, * any are still left it doesn't hurt to keep the extra * check and avoid further damage. */ - gf_log (this->name, GF_LOG_WARNING, - "got disconnect from stale rpc on %s", - brickinfo->path); + GF_LOG_OCCASIONALLY (gd_stale_rpc_disconnect_log, + this->name, GF_LOG_WARNING, + "got disconnect from stale rpc on " + "%s", brickinfo->path); break; } if (glusterd_is_brick_started (brickinfo)) { |