From 7094948e8620c0d38502efcfa2e104e8bc979ec8 Mon Sep 17 00:00:00 2001 From: Nikhil Ladha Date: Wed, 25 Nov 2020 11:42:18 +0530 Subject: 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 --- cli/src/cli-rpc-ops.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- cgit