summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kp@gluster.com>2011-09-15 17:09:00 +0530
committerVijay Bellur <vijay@gluster.com>2011-09-15 22:06:30 -0700
commit4ee093305a0237368118e425723792a028b02a94 (patch)
tree6463dc776aa9d826b71e6308fa832874d7cd4859 /cli
parent77cce4c7df9a61b599a27522696720e747714ff2 (diff)
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 <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-rpc-ops.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index d7a5988f238..c7bb2030e86 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);