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.

Change-Id: I6df0feef41b5cc817cc8d7820ee2acac95176a98
BUG: 1036564
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/6391
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
This commit is contained in:
Aravinda VK 2013-12-02 15:19:17 +05:30 committed by Vijay Bellur
parent be380f35a2
commit 0e5837a449

View File

@ -3128,8 +3128,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;