Bug 1045305 - [SNAPSHOT] : snap create command returned failure for snap names starts with -, but snap is listed on local host
Summary: [SNAPSHOT] : snap create command returned failure for snap names starts with ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: snapshot
Version: rhgs-3.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: RHGS 3.0.0
Assignee: Avra Sengupta
QA Contact: Rahul Hinduja
URL:
Whiteboard: SNAPSHOT
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-20 06:16 UTC by Rahul Hinduja
Modified: 2016-09-17 12:59 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-22 19:30:52 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2014:1278 0 normal SHIPPED_LIVE Red Hat Storage Server 3.0 bug fix and enhancement update 2014-09-22 23:26:55 UTC

Description Rahul Hinduja 2013-12-20 06:16:17 UTC
Description of problem:
=======================

When snapshot is created with snap name starts with "-" (other than -n/-d), command fails but snapshot is listed on the local host.

Created a snapshot using:
=========================

[root@snapshot-09 ~]# gluster snapshot create vol-snap0 -n "-r"
snapshot create: failed: Commit failed on localhost. Please check log file for details.
Snapshot command failed
[root@snapshot-09 ~]#

snapshot create failed

But snapshot is listed on the localhost:
=========================================

[root@snapshot-09 ~]# gluster snapshot list vol-snap0

Volume Name : vol-snap0
Number of snaps taken : 1
Number of snaps available : 255

	Snap Name : -r
	Snap Time : 2013-12-20 04:40:06
	Snap ID : 5dbfb847-e4cc-4f70-88e4-3a8e5242df56
[root@snapshot-09 ~]# 

But on the other nodes in cluster snapshot is not listed:
=========================================================

[root@snapshot-10 ~]# gluster snapshot list vol-snap0

Volume Name : vol-snap0
Number of snaps taken : 0
Number of snaps available : 256
[root@snapshot-10 ~]# 

[root@snapshot-11 ~]# gluster snapshot list vol-snap0

Volume Name : vol-snap0
Number of snaps taken : 0
Number of snaps available : 256
[root@snapshot-11 ~]# 


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

glusterfs-3.4.0.snap.dec03.2013git-1.el6.x86_64


How reproducible:
=================
1/1


Steps to Reproduce:
1. Create a snapshot with snap name as (-<name>)
2. list the snapshot on local host
3. list the snapshot on other nodes in cluster

Actual results:
===============
create failed, but snapshot is listed on local host not on others


Expected results:
=================
When a create fails it should not list on any node. Also -r is considered a valid snap name, it should not fail.

Comment 2 Avra Sengupta 2014-01-13 11:26:10 UTC
Fixed with http://review.gluster.org/#/c/6453/

Comment 3 Rahul Hinduja 2014-01-16 11:44:11 UTC
Verified with the build: glusterfs-3.4.1.snap.jan15.2014git-1.el6.x86_64

Snap create command fails when snap name starts with "-". Also none of the node in cluster displays that. 

[root@snapshot-09 ~]# gluster snapshot create vol0 -n -r
snapshot create: failed: Commit failed on localhost. Please check log file for details.
Snapshot command failed
[root@snapshot-09 ~]#
[root@snapshot-09 ~]# gluster snap list vol0

Volume Name                  : vol0
Number of snaps taken        : 0
Number of snaps available    : 256
[root@snapshot-09 ~]# 


[root@snapshot-10 ~]# gluster snap list vol0

Volume Name                  : vol0
Number of snaps taken        : 0
Number of snaps available    : 256
[root@snapshot-10 ~]# 


[root@snapshot-11 ~]# gluster snap list vol0

Volume Name                  : vol0
Number of snaps taken        : 0
Number of snaps available    : 256
[root@snapshot-11 ~]# 

[root@snapshot-12 ~]# gluster snap list vol0

Volume Name                  : vol0
Number of snaps taken        : 0
Number of snaps available    : 256
[root@snapshot-12 ~]# 


Moving the bug to verified

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

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

Comment 9 errata-xmlrpc 2014-09-22 19:30:52 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


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