[ovirt-devel] Certain questions about Quartz based scheduling in oVirt

Sahina Bose sabose at redhat.com
Tue Nov 25 11:13:06 UTC 2014


On 11/24/2014 06:27 PM, Moti Asayag wrote:
> Hi Shubhendu,
>
> ----- Original Message -----
>> From: "Shubhendu Tripathi" <shtripat at redhat.com>
>> To: devel at ovirt.org
>> Sent: Monday, November 24, 2014 8:58:34 AM
>> Subject: [ovirt-devel] Certain questions about Quartz based scheduling in	oVirt
>>
>> Hi All,
>>
>> We are in a requirement where we need to schedule jobs at certain time
>> interval, hourly, daily, weekly and monthly (i.e. repetitive and cron
>> kind of scheduling).
>> I was trying to understand quartz based scheduling mechanism in oVirt to
>> achieve the scenarios.
>>
>> Have some basic questions regarding the same -
>> 1. Is there is mechanism to persist the scheduling data in oVirt ?
> In ovirt we do not persist the jobs. The application reschedule the jobs when it starts
> and programmatically triggers jobs when required.
>
> On packaging/services/ovirt-engine/ovirt-engine.xml.in we specify the job store configuration
> as RAMJobStore, which is a volatile:
>
>      <property name="org.quartz.jobStore.class" value="org.quartz.simpl.RAMJobStore"/>
>
> You may select other implementation. See:
> http://quartz-scheduler.org/api/2.2.0/org/quartz/spi/JobStore.html

Would the correct approach then be to have multiple scheduler instances?

1. - that uses the in memory job store

2. that uses DB to persist the jobs.

The second instance would be used to schedule and manage any dynamic 
jobs, for instance like the ones required for gluster volume snapshot 
scheduling

Using a separate instance also would mean there's no change to existing 
jobs that are scheduled in Backend bean.


>
>> 2. How to tackle edit and rescheduling of jobs ?
>>
> You can have a look at org.ovirt.engine.core.utils.timer.SchedulerUtil interface in
> the 'scheduler' project which provides that functionality, and the related classes.
>
> But if not special requirements, i guess the shipped quartz implementation should be
> enough:
>
> http://quartz-scheduler.org/documentation/quartz-2.x/tutorials/tutorial-lesson-05
>
>> Kindly guide on how to achieve these.
>>
>> Thanks and Regards,
>> Shubhendu
>> _______________________________________________
>> Devel mailing list
>> Devel at ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/devel
>>
> _______________________________________________
> Devel mailing list
> Devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/devel




More information about the Devel mailing list