[Bugs] [Bug 1209408] New: [Snapshot] Scheduler should accept only valid crond schedules

bugzilla at redhat.com bugzilla at redhat.com
Tue Apr 7 10:06:40 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1209408

            Bug ID: 1209408
           Summary: [Snapshot] Scheduler should accept only valid crond
                    schedules
           Product: GlusterFS
           Version: mainline
         Component: snapshot
          Severity: urgent
          Assignee: bugs at gluster.org
          Reporter: ashah at redhat.com
                CC: bugs at gluster.org, gluster-bugs at redhat.com



Description of problem:

While adding jobs to scheduler for create snapshots, scheduled field accepts
invalid crond formats

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

[root at localhost ~]# rpm -qa | grep glusterfs
glusterfs-fuse-3.7dev-0.910.git17827de.el6.x86_64
glusterfs-rdma-3.7dev-0.910.git17827de.el6.x86_64
glusterfs-libs-3.7dev-0.910.git17827de.el6.x86_64
samba-glusterfs-3.6.509-169.4.el6rhs.x86_64
glusterfs-api-3.7dev-0.910.git17827de.el6.x86_64
glusterfs-3.7dev-0.910.git17827de.el6.x86_64
glusterfs-geo-replication-3.7dev-0.910.git17827de.el6.x86_64
glusterfs-cli-3.7dev-0.910.git17827de.el6.x86_64
glusterfs-server-3.7dev-0.910.git17827de.el6.x86_64

How reproducible:

100&

Steps to Reproduce:

1. Create 6*2 distributed replicate volume
2. create shared storage and mount on each storage node on path
/var/run/gluster/snaps/shared_storage
3. initialize scheduler on each storage node e.g run snap_scheduler.py init 
command 
4. Enable scheduler on storage nodes e.g run snap_scheduler.py enable 
4  Add jobs to scheduler providing invalid crond for formats . 

e.g snap_scheduler.py add job2 " * * * * * * * * " vol0
e.g snap_scheduler.py add job2 " a b c d e f * " vol0

Actual results:

scheduler accepts invalid crond formats 

[root at localhost ~]# snap_scheduler.py add job2 " * * * * * * * * " vol0
snap_scheduler: Successfully added snapshot schedule
[root at localhost ~]# snap_scheduler.py add job2 " a b c d e f * " vol0
snap_scheduler: job2 already exists in schedule. Use 'edit' to modify job2

Expected results:

scheduler should not accept invalid crond formats 
Syntax check should be done for schedule filed while adding jobs. 

Additional info:

[root at localhost ~]# gluster v info

Volume Name: meta
Type: Replicate
Volume ID: ac4dea2d-b500-4666-8a7e-47feac72069c
Status: Started
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: 10.70.47.143:/rhs/brick1/meta1
Brick2: 10.70.47.145:/rhs/brick1/meta2
Options Reconfigured:
features.barrier: disable

Volume Name: vol0
Type: Distributed-Replicate
Volume ID: cd7621bf-7cb6-4b5f-92ec-e8592fe308ce
Status: Started
Number of Bricks: 6 x 2 = 12
Transport-type: tcp
Bricks:
Brick1: 10.70.47.143:/rhs/brick1/b1
Brick2: 10.70.47.145:/rhs/brick1/b2
Brick3: 10.70.47.150:/rhs/brick1/b3
Brick4: 10.70.47.151:/rhs/brick1/b4
Brick5: 10.70.47.143:/rhs/brick2/b5
Brick6: 10.70.47.145:/rhs/brick2/b6
Brick7: 10.70.47.150:/rhs/brick2/b7
Brick8: 10.70.47.151:/rhs/brick2/b8
Brick9: 10.70.47.143:/rhs/brick3/b9
Brick10: 10.70.47.145:/rhs/brick3/10
Brick11: 10.70.47.150:/rhs/brick3/b11
Brick12: 10.70.47.151:/rhs/brick3/b12
Options Reconfigured:
features.barrier: disable

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list