Bug 1084982

Summary: [SNAPSHOT] : Need modification in message while creating snapshot
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: senaik
Component: snapshotAssignee: Joseph Elwin Fernandes <josferna>
Status: CLOSED ERRATA QA Contact: senaik
Severity: medium Docs Contact:
Priority: medium    
Version: rhgs-3.0CC: josferna, rhinduja, rhs-bugs, sankarshan, ssamanta, storage-qa-internal
Target Milestone: ---   
Target Release: RHGS 3.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: SNAPSHOT
Fixed In Version: glusterfs-3.6.0-4.0.el6rhs Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1090041 (view as bug list) Environment:
Last Closed: 2014-09-22 19:35:15 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1090041    

Description senaik 2014-04-07 13:04:05 UTC
Description of problem:
=======================
While creating snapshot, the output message is not same when the snapshot creation is successful and when it fails 

Create snapshot with the snap name that already exists.
-------------------------------------------------------
gluster snapshot create snapa vol0
snapshot create: failed: Snap snapa already exists
Snapshot command failed


Create another snapshot 
-----------------------
gluster snapshot create snapb vol0
snapshot create: snapb: snap created successfully

In the first scenario, we mention snapshot create:failed Snap <snap-name> exists
In the second scnario, we mention snapshot create: snapb: snap created successfully


The output message is not the same . We should get the same message in both the scenarios as shown below (as in the gluster volume command). 
This would be needed in automation when parsing is done 

gluster snapshot create snapa vol0
snapshot create: snapa: failed: Snap snapa already exists
Snapshot command failed

gluster snapshot create snapb vol0
snapshot create: snapb: success: Snap snapb created successfully


gluster volume command 
======================

Gluster volume create command:
-----------------------------
gluster volume create vol4 replica 2 10.70.43.74:/brick4/b4 10.70.43.151:/brick4/b4 10.70.43.32:/brick4/b4 10.70.43.71:/brick4/b4
volume create: vol4: success: please start the volume to access data


gluster volume create vol0 replica 2 10.70.43.74:/brick0/b0 10.70.43.151:/brick0/b0 10.70.43.32:/brick0/b0 10.70.43.71:/brick0/b0
volume create: vol0: failed: Volume vol0 already exists




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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Nagaprasad Sathyanarayana 2014-04-21 06:18:14 UTC
Marking snapshot BZs to RHS 3.0.

Comment 4 Joseph Elwin Fernandes 2014-04-21 14:01:44 UTC
Fixed in http://review.gluster.org/7518

Comment 5 Nagaprasad Sathyanarayana 2014-05-19 10:56:33 UTC
Setting flags required to add BZs to RHS 3.0 Errata

Comment 6 senaik 2014-05-20 09:28:54 UTC
Version : glusterfs-3.6.0.4-1.
=======

Output is as expected. Marking bug as 'Verified'

[root@snapshot01 ~]# gluster snapshot create snap1 vol0
snapshot create: failed: Snap snap1 already exists
Snapshot command failed
[root@snapshot01 ~]# gluster snapshot create snap2 vol0
snapshot create: success: Snap snap2 created successfully

Comment 8 errata-xmlrpc 2014-09-22 19:35:15 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-1278.html