From cfaab6bcce48fcd369d9c8d66be4413d1d0b8356 Mon Sep 17 00:00:00 2001 From: Aravinda VK Date: Mon, 2 Dec 2013 15:19:17 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/6391 Reviewed-on: http://review.gluster.org/6848 Tested-by: Gluster Build System Reviewed-by: Kaushal M --- cli/src/cli-xml-output.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c index 1a418452b..e6cdf5f84 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; -- cgit