Bug 1045333

Summary: [SNAPSHOT] : Snap creation fails when volumes contain "-" ex: vol-snap
Product: Red Hat Gluster Storage Reporter: Rahul Hinduja <rhinduja>
Component: snapshotAssignee: Vijaikumar Mallikarjuna <vmallika>
Status: CLOSED ERRATA QA Contact: Rahul Hinduja <rhinduja>
Severity: medium Docs Contact:
Priority: medium    
Version: rhgs-3.0CC: nsathyan, rhs-bugs, sdharane, senaik, smohan, ssamanta, storage-qa-internal, vmallika
Target Milestone: ---   
Target Release: RHGS 3.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: SNAPSHOT
Fixed In Version: glusterfs-3.4.1.1.snap.feb17.2014git-1.el6.x86_64 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-22 19:30:55 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:

Description Rahul Hinduja 2013-12-20 07:47:56 UTC
Description of problem:
=======================

When volume names are like vol-snap0 and vol-snap1 the CG creation fails. When the volume names are like volume4 and volume5 the CG creation is successful.

[root@snapshot-09 ~]# gluster snapshot create vol-snap0 vol-snap1 -n cg1snapshot create: failed: Commit failed on localhost. Please check log file for details.
Snapshot command failed
[root@snapshot-09 ~]# gluster snapshot create volume4 volume5 -n cg2
snapshot create: cg2: consistency group created successfully
[root@snapshot-09 ~]# 


From the above two command output it is clear that the volume name with "-" are not getting validated. volume name such as vol-snap are valid volnames it should be successful


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 CG with vol-names as "vol-snap1 vol-snap2"
2. CG creation failes


Actual results:
===============

CG creation fails when the volume names contains "-"


Expected results:
=================

volume names such as 'vol-snap1" are valid volume names the CG creation should be successful.

Comment 2 senaik 2013-12-20 09:33:23 UTC
creation of a snap or CG with "-" in the snap name /CG name fails :

gluster snapshot create volume2 -n SNAP-20
snapshot create: failed: Commit failed on localhost. Please check log file for details.
Snapshot command failed
[root@snapshot-01 brick7]# gluster snapshot create volume2 -n SNAP20
snapshot create: SNAP20: snap created successfully

Comment 3 Vijaikumar Mallikarjuna 2014-01-15 08:38:36 UTC
Patch posted: http://review.gluster.org/#/c/6709/

Comment 4 Rahul Hinduja 2014-03-03 11:50:46 UTC
Verified with build: glusterfs-3.4.1.1.snap.feb17.2014git-1.el6.x86_64

[root@snapshot-09 ~]# gluster snapshot create vol-snap5 
snapshot create: 2014_03_03_03_30_14_244600: snap created successfully
[root@snapshot-09 ~]# gluster snapshot create vol-snap5 -n rp1
snapshot create: rp1: snap created successfully
[root@snapshot-09 ~]# 
[root@snapshot-09 ~]# gluster snapshot list vol-snap5

Volume Name                  : vol-snap5
Number of snaps taken        : 2
Number of snaps available    : 254

	Snap Name         : 2014_03_03_03_30_14_244600
	Snap Time         : 2014-03-03 09:00:16
	Snap UUID         : af607a75-3741-4b01-a350-f0a6c756616f

	Snap Name         : rp1
	Snap Time         : 2014-03-03 09:00:26
	Snap UUID         : 31c8a8dd-0d72-46ea-a3a7-fd1421db14df
[root@snapshot-09 ~]# 


Marking the bug as verified:

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

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

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