summaryrefslogtreecommitdiffstats
path: root/cli/src
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2013-07-10 18:10:49 +0530
committerAnand Avati <avati@redhat.com>2013-08-03 05:51:16 -0700
commit572f5f0a85c97a4f90a33be87b96368a0d7e7a8e (patch)
treea5ca4c029acc6b8c8b3e7147373743e629e4a97e /cli/src
parentfbc543633525865b33ff0a156090006c5fdd1ab3 (diff)
cli,glusterd: Fix when tasks are shown in 'volume status'
Asynchronous tasks are shown in 'volume status' only for a normal volume status request for either all volumes or a single volume. Change-Id: I9d47101511776a179d213598782ca0bbdf32b8c2 BUG: 888752 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5308 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'cli/src')
-rw-r--r--cli/src/cli-xml-output.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c
index a2bd2b1..6802705 100644
--- a/cli/src/cli-xml-output.c
+++ b/cli/src/cli-xml-output.c
@@ -1578,7 +1578,11 @@ cli_xml_output_vol_status (cli_local_t *local, dict_t *dict)
XML_RET_CHECK_AND_GOTO (ret, out);
}
- if ((cmd & GF_CLI_STATUS_MASK) == GF_CLI_STATUS_NONE) {
+ /* Tasks are only present when a normal volume status call is done on a
+ * single volume or on all volumes
+ */
+ if (((cmd & GF_CLI_STATUS_MASK) == GF_CLI_STATUS_NONE) &&
+ (cmd & (GF_CLI_STATUS_VOL|GF_CLI_STATUS_ALL))) {
ret = cli_xml_output_vol_status_tasks (local, dict);
if (ret)
goto out;