Bug 1357767

Summary: Wrong XML output for Volume Options
Product: [Community] GlusterFS Reporter: Aravinda VK <avishwan>
Component: cliAssignee: Aravinda VK <avishwan>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.8.1CC: amukherj, bugs, hgowtham
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.8.3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1302277 Environment:
Last Closed: 2016-08-24 10:20:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1302277    
Bug Blocks: 1357766    

Description Aravinda VK 2016-07-19 06:16:53 UTC
+++ This bug was initially created as a clone of Bug #1302277 +++

Description of problem:
gluster volume get <VOLNAME> all --xml returns wrong XML format

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

How reproducible:
Always

Steps to Reproduce:
1. Run gluster volume get <VOLNAME> all --xml

Actual results:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cliOutput>
  <opRet>0</opRet>
  <opErrno>0</opErrno>
  <opErrstr/>
  <volGetopts>
    <count>258</count>
    <Option>cluster.lookup-unhashed</Option>
    <Value>on</Value>
    <Option>cluster.lookup-optimize</Option>
    <Value>off</Value>
    <Option>cluster.min-free-disk</Option>
    <Value>10%</Value>
    <Option>cluster.min-free-inodes</Option>
    <Value>5%</Value>


Expected results:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cliOutput>
  <opRet>0</opRet>
  <opErrno>0</opErrno>
  <opErrstr/>
  <volGetopts>
    <count>258</count>
    <volGetopt>
        <Option>cluster.lookup-unhashed</Option>
        <Value>on</Value>
    </volGetopt>
    <volGetopt>
        <Option>cluster.lookup-optimize</Option>
        <Value>off</Value>
    </volGetopt>
    <volGetopt>
        <Option>cluster.min-free-disk</Option>
        <Value>10%</Value>
    </volGetopt>
    <volGetopt>
        <Option>cluster.min-free-inodes</Option>
        <Value>5%</Value>
    </volGetopt>


Additional info:

--- Additional comment from Vijay Bellur on 2016-07-15 09:28:14 EDT ---

REVIEW: http://review.gluster.org/14931 (cli/xml: Fix wrong XML format in volume get command) posted (#1) for review on master by Aravinda VK (avishwan)

--- Additional comment from Vijay Bellur on 2016-07-16 13:54:17 EDT ---

REVIEW: http://review.gluster.org/14931 (cli/xml: Fix wrong XML format in volume get command) posted (#2) for review on master by Aravinda VK (avishwan)

--- Additional comment from Vijay Bellur on 2016-07-18 08:00:25 EDT ---

COMMIT: http://review.gluster.org/14931 committed in master by Jeff Darcy (jdarcy) 
------
commit bc0b106f0ae8ecd336c7689917e46bc2685603c8
Author: Aravinda VK <avishwan>
Date:   Fri Jul 15 18:49:32 2016 +0530

    cli/xml: Fix wrong XML format in volume get command
    
    Without this Patch,
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <cliOutput>
      <opRet>0</opRet>
      <opErrno>0</opErrno>
      <opErrstr/>
      <volGetopts>
        <count>258</count>
        <Option>cluster.lookup-unhashed</Option>
        <Value>on</Value>
        <Option>cluster.lookup-optimize</Option>
        <Value>off</Value>
        <Option>cluster.min-free-disk</Option>
        <Value>10%</Value>
        <Option>cluster.min-free-inodes</Option>
        <Value>5%</Value>...
    
    With this patch,
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <cliOutput>
      <opRet>0</opRet>
      <opErrno>0</opErrno>
      <opErrstr/>
      <volGetopts>
        <count>258</count>
        <Opt>
            <Option>cluster.lookup-unhashed</Option>
            <Value>on</Value>
        </Opt>
        <Opt>
            <Option>cluster.lookup-optimize</Option>
            <Value>off</Value>
        </Opt>
        <Opt>
            <Option>cluster.min-free-disk</Option>
            <Value>10%</Value>
        </Opt>
        <Opt>
            <Option>cluster.min-free-inodes</Option>
            <Value>5%</Value>
        </Opt>...
    
    BUG: 1302277
    Change-Id: I6c5a040f659f2244ddcd47c57882b4f300cbe52f
    Signed-off-by: Aravinda VK <avishwan>
    Reviewed-on: http://review.gluster.org/14931
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Jeff Darcy <jdarcy>

Comment 1 Vijay Bellur 2016-07-19 06:18:08 UTC
REVIEW: http://review.gluster.org/14950 (cli/xml: Fix wrong XML format in volume get command) posted (#1) for review on release-3.8 by Aravinda VK (avishwan)

Comment 2 Vijay Bellur 2016-08-05 08:20:46 UTC
REVIEW: http://review.gluster.org/14950 (cli/xml: Fix wrong XML format in volume get command) posted (#2) for review on release-3.8 by Aravinda VK (avishwan)

Comment 3 Vijay Bellur 2016-08-11 04:08:31 UTC
COMMIT: http://review.gluster.org/14950 committed in release-3.8 by Atin Mukherjee (amukherj) 
------
commit 757138048fa5d6951dae9114b603f4aae0c8df21
Author: Aravinda VK <avishwan>
Date:   Fri Jul 15 18:49:32 2016 +0530

    cli/xml: Fix wrong XML format in volume get command
    
    Without this Patch,
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <cliOutput>
      <opRet>0</opRet>
      <opErrno>0</opErrno>
      <opErrstr/>
      <volGetopts>
        <count>258</count>
        <Option>cluster.lookup-unhashed</Option>
        <Value>on</Value>
        <Option>cluster.lookup-optimize</Option>
        <Value>off</Value>
        <Option>cluster.min-free-disk</Option>
        <Value>10%</Value>
        <Option>cluster.min-free-inodes</Option>
        <Value>5%</Value>...
    
    With this patch,
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <cliOutput>
      <opRet>0</opRet>
      <opErrno>0</opErrno>
      <opErrstr/>
      <volGetopts>
        <count>258</count>
        <Opt>
            <Option>cluster.lookup-unhashed</Option>
            <Value>on</Value>
        </Opt>
        <Opt>
            <Option>cluster.lookup-optimize</Option>
            <Value>off</Value>
        </Opt>
        <Opt>
            <Option>cluster.min-free-disk</Option>
            <Value>10%</Value>
        </Opt>
        <Opt>
            <Option>cluster.min-free-inodes</Option>
            <Value>5%</Value>
        </Opt>...
    
    > Signed-off-by: Aravinda VK <avishwan>
    > Reviewed-on: http://review.gluster.org/14931
    > Smoke: Gluster Build System <jenkins.org>
    > NetBSD-regression: NetBSD Build System <jenkins.org>
    > CentOS-regression: Gluster Build System <jenkins.org>
    > Reviewed-by: Jeff Darcy <jdarcy>
    
    (cherry picked from commit bc0b106f0ae8ecd336c7689917e46bc2685603c8)
    
    BUG: 1357767
    Change-Id: I6c5a040f659f2244ddcd47c57882b4f300cbe52f
    Signed-off-by: Aravinda VK <avishwan>
    Reviewed-on: http://review.gluster.org/14950
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Smoke: Gluster Build System <jenkins.org>
    Reviewed-by: Atin Mukherjee <amukherj>

Comment 4 Niels de Vos 2016-08-24 10:20:46 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.8.3, please open a new bug report.

glusterfs-3.8.3 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://www.gluster.org/pipermail/announce/2016-August/000059.html
[2] https://www.gluster.org/pipermail/gluster-users/