summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-rpc-ops.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index 9bef143574c..a2519e8c0e8 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -1557,10 +1557,18 @@ gf_cli_print_rebalance_status (dict_t *dict, enum gf_task_types task_type)
snprintf (key, 256, "status-%d", i);
ret = dict_get_int32 (dict, key, (int32_t *)&status_rcd);
- if (ret) {
+ if (ret == -ENOENT) {
gf_log ("cli", GF_LOG_TRACE, "count %d %d", count, i);
gf_log ("cli", GF_LOG_TRACE, "failed to get status");
- goto out;
+ gf_log ("cli", GF_LOG_ERROR, "node down and has failed"
+ " to set dict");
+ continue;
+ /* skip this node if value not available*/
+ } else if (ret) {
+ gf_log ("cli", GF_LOG_TRACE, "count %d %d", count, i);
+ gf_log ("cli", GF_LOG_TRACE, "failed to get status");
+ continue;
+ /* skip this node if value not available*/
}
if (GF_DEFRAG_STATUS_NOT_STARTED == status_rcd)
@@ -1682,10 +1690,17 @@ gf_cli_print_tier_status (dict_t *dict, enum gf_task_types task_type)
snprintf (key, 256, "status-%d", i);
ret = dict_get_int32 (dict, key, (int32_t *)&status_rcd);
- if (ret) {
+ if (ret == -ENOENT) {
gf_log ("cli", GF_LOG_TRACE, "count: %d, %d,"
"failed to get status", count, i);
- goto out;
+ gf_log ("cli", GF_LOG_ERROR, "node down and has failed"
+ " to set dict");
+ continue;
+ /*skipping this node as value unavailable*/
+ } else if (ret) {
+ gf_log ("cli", GF_LOG_TRACE, "count: %d, %d,"
+ "failed to get status", count, i);
+ continue;
}
if (GF_DEFRAG_STATUS_NOT_STARTED == status_rcd)