From 0e5837a4495028e56c75e95a694a0d6123623eb2 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. Change-Id: I6df0feef41b5cc817cc8d7820ee2acac95176a98 BUG: 1036564 Signed-off-by: Aravinda VK Reviewed-on: http://review.gluster.org/6391 Reviewed-by: Krishnan Parthasarathi Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- cli/src/cli-xml-output.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cli') diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c index 6c7bc1752..68d691114 100644 --- a/cli/src/cli-xml-output.c +++ b/cli/src/cli-xml-output.c @@ -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; -- cgit