From 4ee093305a0237368118e425723792a028b02a94 Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Thu, 15 Sep 2011 17:09:00 +0530 Subject: glusterd: profile cmd incorrectly reports all bricks down. If there are no bricks of a volume running 'local' to glusterd where the 'profile info' command is issued, glusterd incorrectly reports that all bricks of the volume are down. Change-Id: Idd703c991f0bcf59b76b9ef8f4ad8cd71960a55b BUG: 3553 Reviewed-on: http://review.gluster.com/430 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- cli/src/cli-rpc-ops.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cli') diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index d7a5988f2..c7bb2030e 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -3330,6 +3330,12 @@ gf_cli3_1_profile_volume_cbk (struct rpc_req *req, struct iovec *iov, ret = dict_get_int32 (dict, "count", &brick_count); if (ret) goto out; + + if (!brick_count) { + cli_out ("All bricks of volume %s are down.", volname); + goto out; + } + while (i <= brick_count) { snprintf (key, sizeof (key), "%d-cumulative", i); ret = dict_get_int32 (dict, key, &interval); -- cgit