Bug 1245084 - [RFE] changes needed in snapshot info command's xml output.
Summary: [RFE] changes needed in snapshot info command's xml output.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: snapshot
Version: rhgs-3.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: RHGS 3.2.0
Assignee: Avra Sengupta
QA Contact: Anil Shah
URL:
Whiteboard: SNAPSHOT
Depends On: 1173437 1250387 1250388
Blocks: 1351503
TreeView+ depends on / blocked
 
Reported: 2015-07-21 07:47 UTC by Avra Sengupta
Modified: 2017-03-23 05:22 UTC (History)
10 users (show)

Fixed In Version: glusterfs-3.8.4-1
Doc Type: Enhancement
Doc Text:
Clone Of: 1173437
Environment:
Last Closed: 2017-03-23 05:22:32 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0486 0 normal SHIPPED_LIVE Moderate: Red Hat Gluster Storage 3.2.0 security, bug fix, and enhancement update 2017-03-23 09:18:45 UTC

Description Avra Sengupta 2015-07-21 07:47:40 UTC
+++ This bug was initially created as a clone of Bug #1173437 +++

Description of problem:
1. If description for a snapshot is not available then the description tag is missing in the xml output of snapshot info command. Its better to have the description tag always and if description is not available then "NA" can be given there. By this the xml output will be more consistent.

2. Its better to give the snapshot creation time as the Epoch time, so that it can be suitably converted to the time zone of the user when showing it in the console.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Avra Sengupta 2015-08-05 10:48:15 UTC
Patch sent upstream for review at http://review.gluster.org/#/c/11834/

Comment 4 Avra Sengupta 2015-08-20 06:01:15 UTC
Upstream patch at http://review.gluster.org/#/c/11834/

Comment 7 Avra Sengupta 2015-08-27 08:03:53 UTC
Based on comment 6 and 7 on https://bugzilla.redhat.com/show_bug.cgi?id=1173437, limiting the scope of the bug to only the description fix.

Comment 9 Mike McCune 2016-03-28 22:16:42 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 11 Avra Sengupta 2016-07-27 10:02:14 UTC
Fixed in master as part of http://review.gluster.org/#/c/11834/

Comment 12 Atin Mukherjee 2016-07-28 10:46:03 UTC
Till we do a rebase the bug shouldn't be moved to MODIFIED as the content is not yet available in the rhgs codebase. Moving the state back to POST.

Comment 17 Anil Shah 2016-10-20 06:27:22 UTC
[root@rhs-client46 core]# gluster snapshot info snap1_GMT-2016.10.20-06.10.09
Snapshot                  : snap1_GMT-2016.10.20-06.10.09
Snap UUID                 : 9b3a1a0f-7690-4e93-9c4f-bb2f1def8475
Created                   : 2016-10-20 06:10:09
Snap Volumes:

	Snap Volume Name          : b0d1575cb10c479ca38a8a5723ffc710
	Origin Volume name        : arvol
	Snaps taken for arvol      : 3
	Snaps available for arvol  : 253
	Status                    : Stopped
 
[root@rhs-client46 core]# gluster snapshot info snap1_GMT-2016.10.20-06.10.09 --xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cliOutput>
  <opRet>0</opRet>
  <opErrno>0</opErrno>
  <opErrstr/>
  <snapInfo>
    <count>1</count>
    <snapshots>
      <snapshot>
        <name>snap1_GMT-2016.10.20-06.10.09</name>
        <uuid>9b3a1a0f-7690-4e93-9c4f-bb2f1def8475</uuid>
        <description/>
        <createTime>2016-10-20 06:10:09</createTime>
        <volCount>1</volCount>
        <snapVolume>
          <name>b0d1575cb10c479ca38a8a5723ffc710</name>
          <status>Stopped</status>
          <originVolume>
            <name>arvol</name>
            <snapCount>3</snapCount>
            <snapRemaining>253</snapRemaining>
          </originVolume>
        </snapVolume>
      </snapshot>
    </snapshots>
  </snapInfo>
</cliOutput>
============================================================================
Snapshot created with description 

[root@rhs-client46 core]# gluster snapshot create snap3 arvol no-timestamp description "Third snapshot in arbitor volume"
snapshot create: success: Snap snap3 created successfully
[root@rhs-client46 core]# gluster snapshot info snap3 
Snapshot                  : snap3
Snap UUID                 : 017f995a-9597-4ba2-a059-7ec9869bbbde
Description               : Third snapshot in arbitor volume
Created                   : 2016-10-20 06:17:29
Snap Volumes:

	Snap Volume Name          : c50b5b574fe245bc8244548900f0de36
	Origin Volume name        : arvol
	Snaps taken for arvol      : 4
	Snaps available for arvol  : 252
	Status                    : Stopped
 
[root@rhs-client46 core]# gluster snapshot info snap3  --xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cliOutput>
  <opRet>0</opRet>
  <opErrno>0</opErrno>
  <opErrstr/>
  <snapInfo>
    <count>1</count>
    <snapshots>
      <snapshot>
        <name>snap3</name>
        <uuid>017f995a-9597-4ba2-a059-7ec9869bbbde</uuid>
        <description>Third snapshot in arbitor volume</description>
        <createTime>2016-10-20 06:17:29</createTime>
        <volCount>1</volCount>
        <snapVolume>
          <name>c50b5b574fe245bc8244548900f0de36</name>
          <status>Stopped</status>
          <originVolume>
            <name>arvol</name>
            <snapCount>4</snapCount>
            <snapRemaining>252</snapRemaining>
          </originVolume>
        </snapVolume>
      </snapshot>
    </snapshots>
  </snapInfo>
</cliOutput>
=====================================================
Snapshot created with description

[root@rhs-client46 core]# gluster snapshot info snap1
Snapshot                  : snap1
Snap UUID                 : fa6a58c8-a6c5-4819-b432-3f63b7be4958
Created                   : 2016-10-20 05:22:51
Snap Volumes:

	Snap Volume Name          : 919d9eb8aaed4d18af5f236157d64104
	Origin Volume name        : arvol
	Snaps taken for arvol      : 2
	Snaps available for arvol  : 254
	Status                    : Started
 
[root@rhs-client46 core]# gluster snapshot info snap1 --xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cliOutput>
  <opRet>0</opRet>
  <opErrno>0</opErrno>
  <opErrstr/>
  <snapInfo>
    <count>1</count>
    <snapshots>
      <snapshot>
        <name>snap1</name>
        <uuid>fa6a58c8-a6c5-4819-b432-3f63b7be4958</uuid>
        <description/>
        <createTime>2016-10-20 05:22:51</createTime>
        <volCount>1</volCount>
        <snapVolume>
          <name>919d9eb8aaed4d18af5f236157d64104</name>
          <status>Started</status>
          <originVolume>
            <name>arvol</name>
            <snapCount>2</snapCount>
            <snapRemaining>254</snapRemaining>
          </originVolume>
        </snapVolume>
      </snapshot>
    </snapshots>
  </snapInfo>
</cliOutput>


Bug verified on build glusterfs-3.8.4-2.el7rhgs.x86_64

Comment 19 errata-xmlrpc 2017-03-23 05:22:32 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.

https://rhn.redhat.com/errata/RHSA-2017-0486.html


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