Bug 1372553 - "gluster vol status all clients --xml" doesn't generate xml if there is a failure in between
Summary: "gluster vol status all clients --xml" doesn't generate xml if there is a fai...
Alias: None
Product: GlusterFS
Classification: Community
Component: cli
Version: mainline
Hardware: All
OS: All
Target Milestone: ---
Assignee: Atin Mukherjee
QA Contact:
Depends On: 1359619
Blocks: 1374290 1374298 1392181
TreeView+ depends on / blocked
Reported: 2016-09-02 04:29 UTC by Atin Mukherjee
Modified: 2017-03-06 17:24 UTC (History)
6 users (show)

Fixed In Version: glusterfs-3.10.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1359619
: 1374290 (view as bug list)
Last Closed: 2017-03-06 17:24:20 UTC
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1392181 0 unspecified CLOSED "gluster vol status all clients --xml" get malformed at times, causes gstatus to fail 2021-02-22 00:41:40 UTC

Internal Links: 1392181

Comment 1 Atin Mukherjee 2016-09-02 04:30:51 UTC
Description of problem:

Sometimes the gstatus command below traceback instead of proper output. The issue is because the glusterd is giving malformed xml outputs to gstatus scripts. 

# gstatus

Traceback (most recent call last):ons
  File "/usr/bin/gstatus", line 221, in <module>
  File "/usr/bin/gstatus", line 135, in main
  File "/usr/lib/python2.7/site-packages/gstatus/libgluster/cluster.py", line 638, in update_state
  File "/usr/lib/python2.7/site-packages/gstatus/libgluster/cluster.py", line 713, in calc_connections
  File "/usr/lib/python2.7/site-packages/gstatus/libcommand/glustercmd.py", line 100, in run
    xmldoc = ETree.fromstring(''.join(self.stdout))
  File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1301, in XML
    return parser.close()
  File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1654, in close
  File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: no element found: line 1, column 0

Version-Release number of selected component (if applicable):

How reproducible:

Not always reproducible. 

Steps to Reproduce:

1. Install glusterfs
2. Install gstatus
3. Run gstatus

Actual results:

gstatus gives traceback at times instead of cluster health status. 

Expected results:

cli should provide the xml output

Comment 2 Worker Ant 2016-09-02 05:14:18 UTC
REVIEW: http://review.gluster.org/15384 (cli: fix volume status xml generation) posted (#1) for review on master by Atin Mukherjee (amukherj@redhat.com)

Comment 3 Worker Ant 2016-09-03 13:09:34 UTC
REVIEW: http://review.gluster.org/15384 (cli: fix volume status xml generation) posted (#2) for review on master by Atin Mukherjee (amukherj@redhat.com)

Comment 4 Worker Ant 2016-09-08 12:05:57 UTC
COMMIT: http://review.gluster.org/15384 committed in master by Atin Mukherjee (amukherj@redhat.com) 
commit 6f182733d943aff5212175c58dd59b2da64b9d8b
Author: Atin Mukherjee <amukherj@redhat.com>
Date:   Fri Sep 2 10:42:44 2016 +0530

    cli: fix volume status xml generation
    While generating xml, if CLI fails in between xml output doesn't get dumped into
    stdout. Fix is to invoke cli_xml_output_vol_status_end () in such failures.
    Change-Id: I7cb3097f5ae23092e6d20f68bd75aa190c31ed88
    BUG: 1372553
    Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
    Reviewed-on: http://review.gluster.org/15384
    NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    Smoke: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: Samikshan Bairagya <samikshan@gmail.com>
    Reviewed-by: Prashanth Pai <ppai@redhat.com>

Comment 5 Shyamsundar 2017-03-06 17:24:20 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.10.0, please open a new bug report.

glusterfs-3.10.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://lists.gluster.org/pipermail/gluster-users/2017-February/030119.html
[2] https://www.gluster.org/pipermail/gluster-users/

Note You need to log in before you can comment on or make changes to this bug.