summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2012-06-21 04:58:04 +0530
committerVijay Bellur <vijay@gluster.com>2012-06-26 07:19:00 -0700
commitd87bd36040128c6553e8ee06a363eeb60d16e72c (patch)
tree0a4392d985b86d95d248965f3d4a0664fc050113
parentc7974318f09ed720471a02f3ec72569d4d7bbdfa (diff)
cli: improvements in the output of rebalance status
Change-Id: I14149dc0eef9236fb089cc1404166efee46ddd1b BUG: 834263 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3608 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--cli/src/cli-rpc-ops.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index 952117413..0b64758fa 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -1105,12 +1105,6 @@ gf_cli3_1_defrag_volume_cbk (struct rpc_req *req, struct iovec *iov,
goto done;
}
- ret = dict_get_int32 (dict, "count", &counter);
- if (ret) {
- gf_log (THIS->name, GF_LOG_ERROR, "count not set");
- goto out;
- }
-
if (cmd == GF_DEFRAG_CMD_STOP) {
if (rsp.op_ret == -1) {
if (strcmp (rsp.op_errstr, ""))
@@ -1139,12 +1133,18 @@ gf_cli3_1_defrag_volume_cbk (struct rpc_req *req, struct iovec *iov,
goto done;
}
}
+
+ ret = dict_get_int32 (dict, "count", &counter);
+ if (ret) {
+ gf_log (THIS->name, GF_LOG_ERROR, "count not set");
+ goto out;
+ }
+
cli_out ("%40s %16s %13s %13s %13s %14s %s", "Node", "Rebalanced-files",
"size", "scanned", "failures", "status", "run time in secs");
cli_out ("%40s %16s %13s %13s %13s %14s %14s", "---------",
"-----------", "-----------", "-----------", "-----------",
"------------", "-----------");
-
do {
snprintf (key, 256, "node-uuid-%d", i);
ret = dict_get_str (dict, key, &node_uuid);
@@ -1211,7 +1211,7 @@ gf_cli3_1_defrag_volume_cbk (struct rpc_req *req, struct iovec *iov,
status = "failed";
break;
}
- cli_out ("%40s %16"PRId64 "%13"PRId64 "%13"PRId64 "%13"PRId64
+ cli_out ("%40s %16"PRIu64 "%13"PRIu64 "%13"PRIu64 "%13"PRIu64
" %14s %14.2f", node_uuid, files, size, lookup,
failures, status, elapsed);
i++;
@@ -1595,7 +1595,7 @@ gf_cli3_remove_brick_status_cbk (struct rpc_req *req, struct iovec *iov,
status = "failed";
break;
}
- cli_out ("%40s %16"PRId64 "%13"PRId64 "%13"PRId64 "%13"PRId64
+ cli_out ("%40s %16"PRIu64 "%13"PRIu64 "%13"PRIu64 "%13"PRIu64
" %14s %14.2f", node_uuid, files, size, lookup,
failures, status, elapsed);
i++;