summaryrefslogtreecommitdiffstats
path: root/cli/src
diff options
context:
space:
mode:
authorShreyas Siravara <sshreyas@fb.com>2016-03-28 14:17:53 -0700
committerJeff Darcy <jeff@pl.atyp.us>2017-09-12 15:12:21 +0000
commit14e24da1eb59a85fe99c22bafd8641ca2b75a923 (patch)
treee027476d10acffbd7d8415884901883f47fae2b7 /cli/src
parent60b35dbfa42a65d81a18efda2776c0e733c4e769 (diff)
event: Idle connection management
Summary: - This diff adds support for detecting and tracking idle client connections. - It allows *service translators* (server, nfs) to opt-in to detect and close idle client connections. - Right now it explicitly restricts the service to NFS as a safety. Here are the debug logs when a client connection gets closed: [2016-03-29 17:27:06.154232] W [socket.c:2426:socket_timeout_handler] 0-socket: Shutting down idle client connection (idle=20s,fd=20,conn=[2401:db00:11:d0af:face:0:3:0:957]->[2401:db00:11:d0af:face:0:3:0:2049])! [2016-03-29 17:27:06.154292] D [event-epoll.c:655:__event_epoll_timeout_slot] 0-epoll: Connection on slot->fd=9 was idle for 20 seconds! [2016-03-29 17:27:06.163282] D [socket.c:629:__socket_rwv] 0-socket.nfs-server: EOF on socket [2016-03-29 17:27:06.163298] D [socket.c:2474:socket_event_handler] 0-transport: disconnecting now [2016-03-29 17:27:06.163316] D [event-epoll.c:614:event_dispatch_epoll_handler] 0-epoll: generation bumped on idx=9 from gen=4 to slot->gen=5, fd=20, slot->fd=20 Test Plan: - Used stuck NFS mounts to create idle clients and unstuck them. Reviewers: kvigor, rwareing Reviewed By: rwareing Subscribers: dld, moox, dph Differential Revision: https://phabricator.fb.com/D3112099 Change-Id: Ic06c89e03f87daabab7f07f892390edd1a1fcc20 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/18265 Reviewed-by: Jeff Darcy <jeff@pl.atyp.us> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'cli/src')
-rw-r--r--cli/src/cli-rl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/src/cli-rl.c b/cli/src/cli-rl.c
index bca37d9c509..e1e087f013a 100644
--- a/cli/src/cli-rl.c
+++ b/cli/src/cli-rl.c
@@ -387,7 +387,7 @@ cli_rl_enable (struct cli_state *state)
goto out;
}
- ret = event_register (state->ctx->event_pool, 0, cli_rl_stdin, state,
+ ret = event_register (state->ctx->event_pool, 0, cli_rl_stdin, NULL, state,
1, 0);
if (ret == -1)
goto out;