From ecef90aa414a4dcb0a0d520be2334f03d06a4451 Mon Sep 17 00:00:00 2001 From: hari gowtham Date: Mon, 21 Aug 2017 15:41:42 +0530 Subject: Command to identify client process command: gluster volume status client-list output: Client connections for volume v1 Name count ----- ------ fuse 2 tierd 1 total clients for volume v1 : 3 ----------------------------------------------------------------- Client connections for volume v2 Name count ----- ------ tierd 1 fuse.gsync 1 total clients for volume v2 : 2 ----------------------------------------------------------------- Updates: #178 Change-Id: I0ff2579d6adf57cc0d3bd0161a2ec6ac6c4747c0 Signed-off-by: hari gowtham Reviewed-on: https://review.gluster.org/18095 Smoke: Gluster Build System Tested-by: hari gowtham CentOS-regression: Gluster Build System Reviewed-by: Atin Mukherjee --- xlators/mgmt/glusterd/src/glusterd-handler.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index c0929fa8192..a3ff49de173 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -4303,6 +4303,16 @@ __glusterd_handle_status_volume (rpcsvc_request_t *req) "Received status volume req for volume %s", volname); } + if ((cmd & GF_CLI_STATUS_CLIENT_LIST) && + (conf->op_version < GD_OP_VERSION_4_0_0)) { + snprintf (err_str, sizeof (err_str), "The cluster is operating " + "at version less than %d. Getting the client-list " + "is not allowed in this state.", + GD_OP_VERSION_4_0_0); + ret = -1; + goto out; + } + if ((cmd & GF_CLI_STATUS_QUOTAD) && (conf->op_version == GD_OP_VERSION_MIN)) { snprintf (err_str, sizeof (err_str), "The cluster is operating " -- cgit