diff options
author | Aravinda VK <avishwan@redhat.com> | 2013-12-02 15:19:17 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-02-06 01:40:33 -0800 |
commit | cfaab6bcce48fcd369d9c8d66be4413d1d0b8356 (patch) | |
tree | f9d8f0a057f2f5ae5503e1575a37fec5cd602f19 | |
parent | f0fac871dc32f0d3756c84c22b7f9b0a6b3daec5 (diff) |
cli: xml: Rebalance status(xml) was empty when a glusterd down
When a glusterd is down in cluster rebalance/remove-brick status
--xml will fail to get status and returns null.
This patch skips collecting status if glusterd is down, and
collects status from all the other up nodes.
BUG: 1036564
Change-Id: Id8fbb63476e136296231d6652a8bd1a4547edbf5
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/6391
Reviewed-on: http://review.gluster.org/6848
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
-rw-r--r-- | cli/src/cli-xml-output.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c index 1a418452bd6..e6cdf5f84f9 100644 --- a/cli/src/cli-xml-output.c +++ b/cli/src/cli-xml-output.c @@ -3138,8 +3138,11 @@ cli_xml_output_vol_rebalance_status (xmlTextWriterPtr writer, dict_t *dict, memset (key, 0, sizeof (key)); snprintf (key, sizeof (key), "status-%d", i); ret = dict_get_int32 (dict, key, &status_rcd); + + /* If glusterd is down it fails to get the status, try + getting status from other nodes */ if (ret) - goto out; + continue; if (GF_DEFRAG_STATUS_NOT_STARTED == status_rcd) continue; |