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.
Fixed with http://review.gluster.org/#/c/6453/
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
Marking snapshot BZs to RHS 3.0.
Setting flags required to add BZs to RHS 3.0 Errata
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