This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1253607 - gluster snapshot status --xml gives back unexpected non xml output
gluster snapshot status --xml gives back unexpected non xml output
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: snapshot (Show other bugs)
3.7.3
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Avra Sengupta
: Triaged
Depends On: 1218732 1245895
Blocks: 1245897
  Show dependency treegraph
 
Reported: 2015-08-14 04:58 EDT by Avra Sengupta
Modified: 2015-09-09 05:39 EDT (History)
5 users (show)

See Also:
Fixed In Version: glusterfs-3.7.4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1245895
Environment:
Last Closed: 2015-09-09 05:39:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Avra Sengupta 2015-08-14 04:58:29 EDT
+++ This bug was initially created as a clone of Bug #1245895 +++

+++ This bug was initially created as a clone of Bug #1218732 +++

Description of problem:
Command 'gluster snapshot status --xml' outputs text that is not part of the xml. This inconsistency breaks my code which only has a reason to expect xml data as input.

Version-Release number of selected component (if applicable):
Seen in 3.6.2.

How reproducible:
Always.

Steps to Reproduce: 
1. Create at least a 2 node cluster.
2. Create 1 volume.
3. Make sure you don't have any snapshots.

Actual results:
root@gfs-test-1:~# gluster snapshot status --xml
No snapshots present
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cliOutput>
  <opRet>0</opRet>
  <opErrno>0</opErrno>
  <opErrstr>(null)</opErrstr>
  <snapStatus>
    <snapshots/>
  </snapStatus>
</cliOutput> 

Expected results:
root@gfs-test-1:~# gluster snapshot status --xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cliOutput>
  <opRet>0</opRet>
  <opErrno>0</opErrno>
  <opErrstr>(null)</opErrstr>
  <snapStatus>
    <snapshots/>
  </snapStatus>
</cliOutput> 


Additional info:
Is this 'null' in the output on purpose? 
  <opErrstr>(null)</opErrstr> 
Other commands like 'gluster snapshot info --xml' show '<opErrstr/>'.


I am marking this as high priority since I parse this output and expect the output to be consistent.

--- Additional comment from Anand Avati on 2015-08-05 07:12:35 EDT ---

REVIEW: http://review.gluster.org/11835 (xml output: Fix non-uniform opErrstr xml output) posted (#1) for review on master by Avra Sengupta (asengupt@redhat.com)

--- Additional comment from Anand Avati on 2015-08-12 04:26:58 EDT ---

REVIEW: http://review.gluster.org/11835 (xml output: Fix non-uniform opErrstr xml output) posted (#2) for review on master by Avra Sengupta (asengupt@redhat.com)
Comment 1 Anand Avati 2015-08-14 04:59:29 EDT
REVIEW: http://review.gluster.org/11920 (xml output: Fix non-uniform opErrstr xml output) posted (#1) for review on release-3.7 by Avra Sengupta (asengupt@redhat.com)
Comment 2 Anand Avati 2015-08-18 03:00:41 EDT
COMMIT: http://review.gluster.org/11920 committed in release-3.7 by Rajesh Joseph (rjoseph@redhat.com) 
------
commit cc0ba2ad47aa9d023f823cced9047a2287a990b4
Author: Avra Sengupta <asengupt@redhat.com>
Date:   Wed Aug 5 16:36:06 2015 +0530

    xml output: Fix non-uniform opErrstr xml output
    
        Backport of http://review.gluster.org/#/c/11835/
    
    Display <opErrstr/> in case of no operrstr for
    all xml output of gluster commands.
    
    Change-Id: Ie16f749f90b4642357c562012408c434cd38661f
    BUG: 1253607
    Signed-off-by: Avra Sengupta <asengupt@redhat.com>
    Reviewed-on: http://review.gluster.org/11920
    Tested-by: NetBSD Build System <jenkins@build.gluster.org>
    Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Comment 3 Kaushal 2015-09-09 05:39:51 EDT
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.7.4, please open a new bug report.

glusterfs-3.7.4 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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/12496
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

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