summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikhil Ladha <nladha@redhat.com>2020-11-25 11:42:18 +0530
committerGitHub <noreply@github.com>2020-11-25 11:42:18 +0530
commit7094948e8620c0d38502efcfa2e104e8bc979ec8 (patch)
tree72414bcb716b3369a67d36b451f5c062af90e03e
parentc28fabc6552ebe74028f80834f5287ba57eb4f1e (diff)
downloadglusterfs-7094948e8620c0d38502efcfa2e104e8bc979ec8.tar.gz
glusterfs-7094948e8620c0d38502efcfa2e104e8bc979ec8.tar.xz
glusterfs-7094948e8620c0d38502efcfa2e104e8bc979ec8.zip
CLI: Added an error message in case of timeout (#1841)
Added an error message in CLI when there are volumes present in the cluster but timeout happens while fetching them. This PR fixes #1738 Signed-off-by: nik-redhat <nladha@redhat.com>
-rw-r--r--cli/src/cli-rpc-ops.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index 35985ab44c..38f247de5d 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -3867,7 +3867,10 @@ gf_cli_get_next_volume(call_frame_t *frame, xlator_t *this, void *data)
if ((global_state->mode & GLUSTER_MODE_XML))
goto end_xml;
- cli_err("No volumes present");
+ if (ret)
+ cli_err("Failed to get volume info");
+ else
+ cli_err("No volumes present");
goto out;
}