Bug 849296 - gluster volume delete --xml outputs wrong xml structure
Summary: gluster volume delete --xml outputs wrong xml structure
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterfs
Version: 2.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: RHGS 2.1.2
Assignee: Kaushal
QA Contact: amainkar
URL:
Whiteboard:
Depends On: 845510
Blocks: 858463
TreeView+ depends on / blocked
 
Reported: 2012-08-18 02:11 UTC by Vidya Sakar
Modified: 2015-05-13 16:30 UTC (History)
7 users (show)

Fixed In Version: glusterfs-3.4.0qa8
Doc Type: Bug Fix
Doc Text:
Clone Of: 845510
: 858463 (view as bug list)
Environment:
Last Closed: 2014-02-25 07:21:50 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2014:0208 0 normal SHIPPED_LIVE Red Hat Storage 2.1 enhancement and bug fix update #2 2014-02-25 12:20:30 UTC

Description Vidya Sakar 2012-08-18 02:11:02 UTC
+++ This bug was initially created as a clone of Bug #845510 +++

gluster volume delete --xml outputs
<cliOutput>
  <volDelete>
    <volname>test2</volname>
  </volDelete>
</cliOutput>

excepted xml is
<cliOutput>
  <opRet>0</opRet>
  <opErrno>0</opErrno>
  <opErrstr/>
  <volDelete>
    <volume>
      <name>music</name>
      <id>b3114c71-741b-4c6f-a39e-80384c4ea3cf</id>
    </volume>
  </volDelete>
</cliOutput>

Comment 2 Kaushal 2012-10-10 07:22:46 UTC
Patch for upstream/master under review at http://review.gluster.org/3869

Comment 3 Kaushal 2012-10-12 03:51:19 UTC
Fixed by commit f1f3d1c (cli: Changes and enhancements to XML output) for bug https://bugzilla.redhat.com/show_bug.cgi?id=828131 . Reviewed at http://review.gluster.org/3869 .

Comment 4 Bala.FA 2012-11-23 06:44:50 UTC
Not yet fixed in version glusterfs 3.3.0rhsvirt1-8.el6rhs, Moving to ASSIGNED

Comment 5 Amar Tumballi 2012-11-26 03:50:17 UTC
fixed only in upstream... available to testing with 3.4.0qa2 release.

Comment 6 Rachana Patel 2012-12-27 05:31:19 UTC
verified on glusterfs 3.4.0qa5 

not working as per excepted xml mentioned above so changing status

actual output:-

gluster volume delete test --xml 
Deleting volume will erase all information about the volume. Do you want to continue? (y/n) y 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<cliOutput><opRet>0</opRet><opErrno>115</opErrno><opErrstr></opErrstr><volDelete><volume><name>test</name><id>fc58bdfa-d7f4-41bf-b829-5bf8f35713fb</id></volume></volDelete></cliOutput>

Comment 7 Amar Tumballi 2012-12-27 05:51:55 UTC
I see that there is nothing wrong in the output... why did it fail QA?

to see the xml output in a 'pretty' format, try below

"gluster volume delete test --xml | xmllint --format -"

Comment 8 Rachana Patel 2012-12-27 06:46:27 UTC
not related to format

in output when there is no value for any tag it should be <tagname/> not <tagname></tagname>

in above output - <opErrstr></opErrstr> is not coming properly, that's why.

Comment 9 Kaushal 2012-12-29 07:38:18 UTC
The fix for this under review here http://review.gluster.org/4355

Comment 11 Rachana Patel 2013-05-03 10:22:28 UTC
verified on 3.4.0.2rhs-1.el6rhs.x86_64

working as per expected xml mentioned in description, need info before I change status to 'Verified'

1.<opErrno> is always 115. Is this expected behaviour?
2. In case of failure,   <volDelete> and all tags under it are not displayed. Is this expected behaviour?

e.g.
[root@cutlass ~]# gluster volume delete  22 --xml
Deleting volume will erase all information about the volume. Do you want to continue? (y/n) y
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cliOutput>
  <opRet>0</opRet>
  <opErrno>115</opErrno>
  <opErrstr/>
  <volDelete>
    <volume>
      <name>22</name>
      <id>fc487e35-179f-49c3-91c5-efdce5525dea</id>
    </volume>
  </volDelete>
</cliOutput>

[root@cutlass ~]# gluster volume delete  22 --xml
Deleting volume will erase all information about the volume. Do you want to continue? (y/n) y
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cliOutput>
  <opRet>-1</opRet>
  <opErrno>115</opErrno>
  <opErrstr>Volume 22 does not exist</opErrstr>
</cliOutput>

Comment 12 Kaushal 2013-05-23 07:19:47 UTC
Regarding the tags not being shown during error, that is expected. And I believe that's good enough for RHSC team, which is the primary user for xml outputs.

Anyway, tagging this as a needinfo from Bala.

Bala,
Can you give your opinions?



Other than that, I'll take a look into the other errors. Reducing priority, as I this isn't something serious.

- Kaushal

Comment 13 Bala.FA 2013-12-13 07:24:25 UTC
Current xml output resolves this issue.  I would prefer this bz to be closed safely.

Comment 14 Rachana Patel 2014-01-07 09:36:30 UTC
verified with 3.4.0.53rhs-1.el6_4.x86_64

giving xml output in proper format hence moving it to verified

Comment 16 errata-xmlrpc 2014-02-25 07:21:50 UTC
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.

http://rhn.redhat.com/errata/RHEA-2014-0208.html


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