[Bugs] [Bug 1278073] New: The "--xml" option doesn't work for "gluster snapshot status"

bugzilla at redhat.com bugzilla at redhat.com
Wed Nov 4 16:20:54 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1278073

            Bug ID: 1278073
           Summary: The "--xml" option doesn't work for "gluster snapshot
                    status"
           Product: GlusterFS
           Version: 3.7.5
         Component: snapshot
          Assignee: bugs at gluster.org
          Reporter: syuusyou at gmail.com
                CC: bugs at gluster.org, gluster-bugs at redhat.com



Description of problem:
1. When I try to get the snapshot status in xml format, the "--xml" option
doesn't work for command "gluster snapshot status"
2. Show snapshot status for specified snapshot in xml format doesn't show
anything.

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

How reproducible:

Steps to Reproduce:
1. Create a volume with multiple bricks
2. Take several snapshots for this volume
3. Run command "gluster snapshot status --xml"

Actual results:

I have a volume created by 4 bricks and already took 2 snapshots. 
When I run command "gluster snapshot status", I got:

Snap Name : snap1_GMT-2015.11.03-02.51.11
Snap UUID : 95dca986-7492-42f8-8a20-133e186dbdf7

        Brick Path        :  
gfs-m1:/run/gluster/snaps/dd45a201cd1c4788b05b57b5a652aeb8/brick1/fs
        Volume Group      :   vg1
        Brick Running     :   No
        Brick PID         :   N/A
        Data Percentage   :   0.31
        LV Size           :   100.00g


        Brick Path        :  
gfs-m1:/run/gluster/snaps/dd45a201cd1c4788b05b57b5a652aeb8/brick2/fs
        Volume Group      :   vg1
        Brick Running     :   No
        Brick PID         :   N/A
        Data Percentage   :   0.31
        LV Size           :   100.00g


        Brick Path        :  
gfs-m1:/run/gluster/snaps/dd45a201cd1c4788b05b57b5a652aeb8/brick3/fs
        Volume Group      :   vg1
        Brick Running     :   No
        Brick PID         :   N/A
        Data Percentage   :   0.31
        LV Size           :   100.00g


        Brick Path        :  
gfs-m1:/run/gluster/snaps/dd45a201cd1c4788b05b57b5a652aeb8/brick4/fs
        Volume Group      :   vg1
        Brick Running     :   No
        Brick PID         :   N/A
        Data Percentage   :   0.31
        LV Size           :   100.00g


Snap Name : snap2_GMT-2015.11.03-02.51.57
Snap UUID : 9b31a4fd-6e04-460d-9aaf-b16d1bfed8a2

        Brick Path        :  
gfs-m1:/run/gluster/snaps/3aaf2d06b3034799bab05ba1f1479e9c/brick1/fs
        Volume Group      :   vg1
        Brick Running     :   No
        Brick PID         :   N/A
        Data Percentage   :   0.31
        LV Size           :   100.00g


        Brick Path        :  
gfs-m1:/run/gluster/snaps/3aaf2d06b3034799bab05ba1f1479e9c/brick2/fs
        Volume Group      :   vg1
        Brick Running     :   No
        Brick PID         :   N/A
        Data Percentage   :   0.31
        LV Size           :   100.00g


        Brick Path        :  
gfs-m1:/run/gluster/snaps/3aaf2d06b3034799bab05ba1f1479e9c/brick3/fs
        Volume Group      :   vg1
        Brick Running     :   No
        Brick PID         :   N/A
        Data Percentage   :   0.31
        LV Size           :   100.00g


        Brick Path        :  
gfs-m1:/run/gluster/snaps/3aaf2d06b3034799bab05ba1f1479e9c/brick4/fs
        Volume Group      :   vg1
        Brick Running     :   No
        Brick PID         :   N/A
        Data Percentage   :   0.31
        LV Size           :   100.00g

But when I ran the same command with "--xml" option, I got:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cliOutput>
  <opRet>0</opRet>
  <opErrno>0</opErrno>
  <opErrstr/>
  <snapStatus>
    <snapshots>
      <snapshot>
        <name>snap1_GMT-2015.11.03-02.51.11</name>
        <uuid>95dca986-7492-42f8-8a20-133e186dbdf7</uuid>
        <volCount>1</volCount>
        <volume>
          <brickCount>4</brickCount>
          <brick>
           
<path>gfs-m1:/run/gluster/snaps/dd45a201cd1c4788b05b57b5a652aeb8/brick1/fs</path>
            <volumeGroup>vg1</volumeGroup>
            <snapshot>
              <name>snap2_GMT-2015.11.03-02.51.57</name>
              <uuid>9b31a4fd-6e04-460d-9aaf-b16d1bfed8a2</uuid>
              <volCount>1</volCount>
              <volume>
                <brickCount>4</brickCount>
                <brick>
                 
<path>gfs-m1:/run/gluster/snaps/3aaf2d06b3034799bab05ba1f1479e9c/brick1/fs</path>
                  <volumeGroup>vg1</volumeGroup>
                </brick>
              </volume>
            </snapshot>
          </brick>
        </volume>
      </snapshot>
    </snapshots>
  </snapStatus>
</cliOutput>

which put the status of snap2 in the snap1, and only show one brick
information.

Expected results:

Additional info:

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list