Bug 849296 - gluster volume delete --xml outputs wrong xml structure
gluster volume delete --xml outputs wrong xml structure
Status: CLOSED ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: glusterfs (Show other bugs)
2.0
Unspecified Unspecified
medium Severity high
: ---
: RHGS 2.1.2
Assigned To: Kaushal
amainkar
: ZStream
Depends On: 845510
Blocks: 858463
  Show dependency treegraph
 
Reported: 2012-08-17 22:11 EDT by Vidya Sakar
Modified: 2015-05-13 12:30 EDT (History)
7 users (show)

See Also:
Fixed In Version: glusterfs-3.4.0qa8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 845510
: 858463 (view as bug list)
Environment:
Last Closed: 2014-02-25 02:21:50 EST
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 Vidya Sakar 2012-08-17 22:11:02 EDT
+++ 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 03:22:46 EDT
Patch for upstream/master under review at http://review.gluster.org/3869
Comment 3 Kaushal 2012-10-11 23:51:19 EDT
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 01:44:50 EST
Not yet fixed in version glusterfs 3.3.0rhsvirt1-8.el6rhs, Moving to ASSIGNED
Comment 5 Amar Tumballi 2012-11-25 22:50:17 EST
fixed only in upstream... available to testing with 3.4.0qa2 release.
Comment 6 Rachana Patel 2012-12-27 00:31:19 EST
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 00:51:55 EST
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 01:46:27 EST
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 02:38:18 EST
The fix for this under review here http://review.gluster.org/4355
Comment 11 Rachana Patel 2013-05-03 06:22:28 EDT
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 03:19:47 EDT
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 02:24:25 EST
Current xml output resolves this issue.  I would prefer this bz to be closed safely.
Comment 14 Rachana Patel 2014-01-07 04:36:30 EST
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 02:21:50 EST
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.