diff options
author | Nikhil Ladha <nladha@redhat.com> | 2020-11-25 11:42:18 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-25 11:42:18 +0530 |
commit | 7094948e8620c0d38502efcfa2e104e8bc979ec8 (patch) | |
tree | 72414bcb716b3369a67d36b451f5c062af90e03e | |
parent | c28fabc6552ebe74028f80834f5287ba57eb4f1e (diff) | |
download | glusterfs-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.c | 5 |
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; } |