Bug 1208067 - [SNAPSHOT]: Snapshot create fails while using scheduler to create snapshots
Summary: [SNAPSHOT]: Snapshot create fails while using scheduler to create snapshots
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: snapshot
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Avra Sengupta
QA Contact:
URL:
Whiteboard: Scheduler
Depends On:
Blocks: qe_tracker_everglades 1224244
TreeView+ depends on / blocked
 
Reported: 2015-04-01 10:24 UTC by senaik
Modified: 2015-09-01 12:23 UTC (History)
5 users (show)

Fixed In Version: glusterfs-3.7.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1224244 (view as bug list)
Environment:
Last Closed: 2015-05-15 17:09:20 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description senaik 2015-04-01 10:24:34 UTC
Description of problem:
=======================
While creating snapshots using scheduler, snapshot create fails with "Invalid Syntax error"

Version-Release number of selected component (if applicable):
============================================================
glusterfs 3.7dev built on Mar 27 2015 

How reproducible:
=================
always


Steps to Reproduce:
==================
1.Create a 6x2 dist-rep volume and start it 
  Enable USS and quota on the volume

2.Fuse and NFS mount the volume and create some IO

3.Create another dist-rep volume – this is the shared storage which will be mounted on all nodes

4. Initialise the snapshot scheduler on all nodes using snap_scheduler.py init

5. Enable the snap scheduler on all nodes using snap_scheduler.py enable

6. Add a job which will create a new snapshot schedule for every 30mins on the volume using snap_scheduler.py add J2 "*/30 * * * * " vol2

7. List the Job scheduled using snap_scheduler.py list

[root@inception ~]# snap_scheduler.py list
JOB_NAME         SCHEDULE         OPERATION        VOLUME NAME      
--------------------------------------------------------------------
J1               */30 * * * *     Snapshot Create  vol0             
J2               */2 * * * *      Snapshot Create  vol2              

8.Check gluster snapshot list after an hour. There were no snapshots created. 

9.Check /var/log/glusterfs/gcron.log. snapshot create fails with "Invalid Syntax" error

[2015-04-01 12:30:01,881 gcron.py:137 main] DEBUG locking_file = /var/run/gluster/snaps/shared_storage/lock_files/J1
[2015-04-01 12:30:01,882 gcron.py:138 main] DEBUG volname = vol0
[2015-04-01 12:30:01,899 gcron.py:92 doJob] DEBUG /var/run/gluster/snaps/shared_storage/lock_files/J1 last modified at Wed Apr  1 12:30:01 2015
[2015-04-01 12:30:01,899 gcron.py:102 doJob] INFO Job Snapshot-vol0 has been processed already
[2015-04-01 13:00:02,043 gcron.py:137 main] DEBUG locking_file = /var/run/gluster/snaps/shared_storage/lock_files/J1
[2015-04-01 13:00:02,043 gcron.py:138 main] DEBUG volname = vol0
[2015-04-01 13:00:02,051 gcron.py:92 doJob] DEBUG /var/run/gluster/snaps/shared_storage/lock_files/J1 last modified at Wed Apr  1 13:00:01 2015
[2015-04-01 13:00:02,051 gcron.py:94 doJob] DEBUG Processing job Snapshot-vol0
[2015-04-01 13:00:02,051 gcron.py:64 takeSnap] DEBUG Running command 'gluster snapshot create vol0-snapshot-20150401130002 vol0'
[2015-04-01 13:00:02,180 gcron.py:71 takeSnap] DEBUG Command 'gluster snapshot create vol0-snapshot-20150401130002 vol0' returned '1'
[2015-04-01 13:00:02,180 gcron.py:74 takeSnap] ERROR Snapshot of vol0 failed
[2015-04-01 13:00:02,185 gcron.py:75 takeSnap] ERROR Command output:
[2015-04-01 13:00:02,186 gcron.py:76 takeSnap] ERROR Invalid Syntax.
Usage: snapshot create <snapname> <volname(s)> [no-timestamp] [description <description>] [force]

[2015-04-01 13:00:02,186 gcron.py:98 doJob] ERROR Job Snapshot-vol0 failed
[2015-04-01 13:30:01,748 gcron.py:137 main] DEBUG locking_file = /var/run/gluster/snaps/shared_storage/lock_files/J1
[2015-04-01 13:30:01,749 gcron.py:138 main] DEBUG volname = vol0

Actual results:


Expected results:


Additional info:

Comment 2 Anand Avati 2015-04-02 09:48:26 UTC
REVIEW: http://review.gluster.org/10114 (snapshot/scheduler: Fix the snapshot create command.) posted (#1) for review on master by Avra Sengupta (asengupt)

Comment 3 Anand Avati 2015-04-02 11:05:07 UTC
REVIEW: http://review.gluster.org/10114 (snapshot/scheduler: Fix the snapshot create command.) posted (#2) for review on master by Avra Sengupta (asengupt)

Comment 4 Anand Avati 2015-04-02 11:48:49 UTC
REVIEW: http://review.gluster.org/10114 (snapshot/scheduler: Fix the snapshot create command.) posted (#3) for review on master by Avra Sengupta (asengupt)

Comment 5 Anand Avati 2015-04-04 17:50:03 UTC
COMMIT: http://review.gluster.org/10114 committed in master by Vijay Bellur (vbellur) 
------
commit f7a14c0fe5fe92fc6ebaf37322748918a57afef8
Author: Avra Sengupta <asengupt>
Date:   Thu Apr 2 12:51:34 2015 +0530

    snapshot/scheduler: Fix the snapshot create command.
    
    The create command being executed was sent with wrong
    parameters.
    
    Change-Id: I9b3cf23b3a02cf8309d50bf70439ad02b37f191a
    BUG: 1208067
    Signed-off-by: Avra Sengupta <asengupt>
    Reviewed-on: http://review.gluster.org/10114
    Reviewed-by: Aravinda VK <avishwan>
    Tested-by: Gluster Build System <jenkins.com>

Comment 6 Niels de Vos 2015-05-15 17:09:20 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


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