+++ 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.
Fix sent upstream for review at xml output: Fix non-uniform opErrstr xml output
Master URL: http://review.gluster.org/#/c/11835/ Release 3.7 URL: http://review.gluster.org/#/c/11920/ RHGS 3.1.1 URL: https://code.engineering.redhat.com/gerrit/#/c/55411/
Marking this bugs as dependent on 1245077, as the fix for text output is sent as part of the fix of 1245077 which also has the same issue.
Verified this bug with glusterfs-3.7.1-14.el7rhgs.x86_64 build and its working as expected. Steps followed as below: 1) Created a cluster of 4 nodes. 2) Created a 4x3 dis-rep volume. 3) without creating any snapshot, following are the outputs of commands: [root@dhcp35-148 ~]# gluster snapshot status --xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cliOutput> <opRet>0</opRet> <opErrno>0</opErrno> <opErrstr/> <snapStatus> <snapshots/> </snapStatus> </cliOutput> [root@dhcp35-148 ~]# gluster snapshot info --xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cliOutput> <opRet>0</opRet> <opErrno>0</opErrno> <opErrstr/> <snapInfo> <count>0</count> <snapshots/> </snapInfo> </cliOutput> [root@dhcp35-148 ~]# gluster snapshot list --xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cliOutput> <opRet>0</opRet> <opErrno>0</opErrno> <opErrstr/> <snapList> <count>0</count> </snapList> </cliOutput> The output of all of the above snapshot commands is consistent and is according to what is expected. Hence marking this bug as Verified.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-1845.html