path: root/cli/src/cli-xml-output.c
diff options
authorhari <>2015-12-28 16:04:50 +0530
committerDan Lambright <>2016-03-16 01:26:54 -0700
commit1249030962a177d077e76d346d66ef6061b818ed (patch)
treec16ad54e6699ff3e888f4f6b59e76b6e80018bd5 /cli/src/cli-xml-output.c
parent8d8743ebf0eea7e87eef4cabb7ebcef4a602c471 (diff)
Cli/tier: separating services from cold bricks in xml
fix: The cold bricks tag included the processes also. The patch has removed the processes from being mentioned inside the cold brick tag and are mentioned below by closing the cold brick tag after the brick count. Previous output: <coldBricks> <node> <hostname></hostname> <path>/data/gluster/b3</path> <peerid>8c088528-e1aee3b2b40f</peerid> <status>1</status> <port>49157</port> <ports> <tcp>49157</tcp> <rdma>N/A</rdma> </ports> <pid>1160</pid> </node> <node> <hostname>NFS Server</hostname> <path>localhost</path> <peerid>8c088528-e1aee3b2b40f</peerid> <status>0</status> <port>N/A</port> <ports> <tcp>N/A</tcp> <rdma>N/A</rdma> </ports> <pid>-1</pid> </node> </coldBricks> Expected output: <coldBricks> <node> <hostname></hostname> <path>/data/gluster/b3</path> <peerid>8c088528-e1aee3b2b40f</peerid> <status>1</status> <port>49157</port> <ports> <tcp>49157</tcp> <rdma>N/A</rdma> </ports> <pid>1160</pid> </node> </coldBricks> <node> <hostname>NFS Server</hostname> <path>localhost</path> <peerid>8c088528-e1aee3b2b40f</peerid> <status>0</status> <port>N/A</port> <ports> <tcp>N/A</tcp> <rdma>N/A</rdma> </ports> <pid>-1</pid> </node> Change-Id: Ieccd017d7b2edb16786323f1a76402f020bdfb0d BUG: 1294497 Signed-off-by: hari <> Reviewed-on: Smoke: Gluster Build System <> Tested-by: hari gowtham <> NetBSD-regression: NetBSD Build System <> CentOS-regression: Gluster Build System <> Reviewed-by: Dan Lambright <>
Diffstat (limited to 'cli/src/cli-xml-output.c')
1 files changed, 5 insertions, 6 deletions
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c
index 0f501782f25..439c3047e31 100644
--- a/cli/src/cli-xml-output.c
+++ b/cli/src/cli-xml-output.c
@@ -1753,12 +1753,11 @@ cli_xml_output_vol_status (cli_local_t *local, dict_t *dict)
ret = xmlTextWriterEndElement (local->writer);
- }
- /* </coldBricks>*/
- if (type == GF_CLUSTER_TYPE_TIER && i >= hot_brick_count) {
- ret = xmlTextWriterEndElement (local->writer);
- XML_RET_CHECK_AND_GOTO (ret, out);
+ /* </coldBricks>*/
+ if (type == GF_CLUSTER_TYPE_TIER && i == brick_index_max) {
+ ret = xmlTextWriterEndElement (local->writer);
+ XML_RET_CHECK_AND_GOTO (ret, out);
+ }
/* Tasks are only present when a normal volume status call is done on a