summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorhari <hgowtham@redhat.com>2015-12-28 16:04:50 +0530
committerDan Lambright <dlambrig@redhat.com>2016-03-22 02:05:57 -0700
commit35c401430a964f62d7e13db5d2294e43b2bba36a (patch)
tree7d7b0338ce9c84b6016831d17ca091bcefa0713d /cli
parente2bd0563a352e1d22a24f6a8a99beb4d4b8eb2ac (diff)
Cli/tier: separating services from cold bricks in xml
back-port of : http://review.gluster.org/#/c/13101/ 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>192.168.1.102</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>192.168.1.102</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 <hgowtham@redhat.com> >Reviewed-on: http://review.gluster.org/13101 >Smoke: Gluster Build System <jenkins@build.gluster.com> >Tested-by: hari gowtham <hari.gowtham005@gmail.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Dan Lambright <dlambrig@redhat.com> Change-Id: Ia207b4f8140c7a449ca3e3e2c90e5f69dac88d57 BUG: 1318505 Signed-off-by: hari <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/13757 Smoke: Gluster Build System <jenkins@build.gluster.com> Tested-by: hari gowtham <hari.gowtham005@gmail.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-xml-output.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c
index f7ae0578b15..d402d6bbd9e 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);
XML_RET_CHECK_AND_GOTO (ret, out);
- }
-
- /* </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