diff options
author | hari gowtham <hgowtham@redhat.com> | 2017-08-21 15:41:42 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2017-09-06 11:52:40 +0000 |
commit | ecef90aa414a4dcb0a0d520be2334f03d06a4451 (patch) | |
tree | 5559c8f7671dd487af8c4205626024a688a1d078 /xlators/mgmt/glusterd/src/glusterd-syncop.c | |
parent | b1b49997574eeb7c6a42e6e8257c81ac8d2d7578 (diff) |
Command to identify client process
command: gluster volume status <volname/all> 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 <hgowtham@redhat.com>
Reviewed-on: https://review.gluster.org/18095
Smoke: Gluster Build System <jenkins@build.gluster.org>
Tested-by: hari gowtham <hari.gowtham005@gmail.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-syncop.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-syncop.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c index e327c168d20..aa47517c356 100644 --- a/xlators/mgmt/glusterd/src/glusterd-syncop.c +++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c @@ -987,7 +987,6 @@ gd_syncop_mgmt_brick_op (struct rpc_clnt *rpc, glusterd_pending_node_t *pnode, else GF_FREE (args.errstr); } - if (op == GD_OP_STOP_VOLUME || op == GD_OP_REMOVE_BRICK) { if (args.op_ret == 0) { brickinfo = pnode->node; @@ -1758,7 +1757,16 @@ gd_brick_op_phase (glusterd_op_t op, dict_t *op_ctx, dict_t *req_dict, } ret = gd_syncop_mgmt_brick_op (rpc, pending_node, op, req_dict, op_ctx, op_errstr); - if (cmd == GF_OP_CMD_DETACH_START) { + if (op == GD_OP_STATUS_VOLUME) { + /* for client-list its enough to quit the loop + * once we get the value from one brick + * */ + ret = dict_get_int32 (req_dict, "cmd", &cmd); + if (!ret && (cmd & GF_CLI_STATUS_CLIENT_LIST)) { + if (dict_get (op_ctx, "client-count")) + break; + } + } else if (cmd == GF_OP_CMD_DETACH_START) { op = GD_OP_REMOVE_BRICK; dict_del (req_dict, "rebalance-command"); } else if (cmd == GF_DEFRAG_CMD_DETACH_START) { |