enable client or job and scheduler

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

enable client or job and scheduler

Ulrich Leodolter-2
Hi all,

it seems that enable client or job does not trigger an update and requeue for the scheduler.

we use a cron job which dynamically enables/disables workstation jobs 10 minutes before they are scheduled in the evening.  if somewone powers of his workstation on weekend then backup job will be disabled and we get no failed jobs.  on monday evening the job will be enabled if the workstation is alive.  but we noticed that the jobs does not run if it is sheduled 10 minutes later.

it seems there must be some action on the scheduler between the enable job and the scheduled time or the time between enable and scheduled time must be greater than 1 hour.  at least we observed this behaviour.

but i would expect that enable job or client triggers also a requeue for the scheduler if there are any assoicated scheduldes.

is there any command which triggers a rescan for the scheduler?

Best regards
Ulrich

p.s. running bacula 7.4.4 community version

Ulrich Leodolter <[hidden email]>
Oesterreichische Bibliothekenverbund und Service GmbH
Raimundgasse 1/3, A-1020 Wien
Fax +43 1 4035158-30
Tel +43 1 4035158-21
Web http://www.obvsg.at

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel
Reply | Threaded
Open this post in threaded view
|

Re: enable client or job and scheduler

Kern Sibbald
Hello Ulrich,

On 11/11/2016 09:52 AM, Ulrich Leodolter wrote:
> Hi all,
>
> it seems that enable client or job does not trigger an update and requeue for the scheduler.
The scheduler queue is refreshed approximately once an hour, so if you
activate a schedule, it will probably not be noticed until the next refresh.
>
> we use a cron job which dynamically enables/disables workstation jobs 10 minutes before they are scheduled in the evening.  if somewone powers of his workstation on weekend then backup job will be disabled and we get no failed jobs.  on monday evening the job will be enabled if the workstation is alive.  but we noticed that the jobs does not run if it is sheduled 10 minutes later.
>
> it seems there must be some action on the scheduler between the enable job and the scheduled time or the time between enable and scheduled time must be greater than 1 hour.  at least we observed this behaviour.
>
> but i would expect that enable job or client triggers also a requeue for the scheduler if there are any assoicated scheduldes.
That code does not currently exist.

> is there any command which triggers a rescan for the scheduler?

If you run your cron job at least one hour before the job should be
scheduled, I think it will work.  If you try that please let me know if
it works or not.

Best regards,
Kern

>
> Best regards
> Ulrich
>
> p.s. running bacula 7.4.4 community version
>
> Ulrich Leodolter <[hidden email]>
> Oesterreichische Bibliothekenverbund und Service GmbH
> Raimundgasse 1/3, A-1020 Wien
> Fax +43 1 4035158-30
> Tel +43 1 4035158-21
> Web http://www.obvsg.at
>
> ------------------------------------------------------------------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> _______________________________________________
> Bacula-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/bacula-devel
>


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel
Reply | Threaded
Open this post in threaded view
|

Re: enable client or job and scheduler

Ulrich Leodolter-2
Hi Kern,

> Kern Sibbald <[hidden email]> hat am 11. November 2016 um 10:33 geschrieben:
>
>
> Hello Ulrich,
>
> On 11/11/2016 09:52 AM, Ulrich Leodolter wrote:
> > Hi all,
> >
> > it seems that enable client or job does not trigger an update and requeue for the scheduler.
> The scheduler queue is refreshed approximately once an hour, so if you
> activate a schedule, it will probably not be noticed until the next refresh.
> >
> > we use a cron job which dynamically enables/disables workstation jobs 10 minutes before they are scheduled in the evening.  if somewone powers of his workstation on weekend then backup job will be disabled and we get no failed jobs.  on monday evening the job will be enabled if the workstation is alive.  but we noticed that the jobs does not run if it is sheduled 10 minutes later.
> >
> > it seems there must be some action on the scheduler between the enable job and the scheduled time or the time between enable and scheduled time must be greater than 1 hour.  at least we observed this behaviour.
> >
> > but i would expect that enable job or client triggers also a requeue for the scheduler if there are any assoicated scheduldes.
> That code does not currently exist.
>

Do you think that would be useful ?  then i coud try to develop that code and provided a patch.

> > is there any command which triggers a rescan for the scheduler?
>
> If you run your cron job at least one hour before the job should be
> scheduled, I think it will work.  If you try that please let me know if
> it works or not.
>

Actually we use this workaround since a few days, and it seems to work.

We run the script twice, 1:10h and 10min before all workstation jobs are scheduled in the evening, if someone powers of the machine inbetween the corresponding job will be disabled by the second run.  the scheduler is not updated but it will not start because the enabled flag is checked.

I pushed my simple script to github, it depends on the old bweb perl modules and naming conventions of config files, client names and job names (we are still using a slightly modified bweb against 7.4.4)

https://github.com/uleodolter/bacula/blob/master/scripts/run_CheckUsers

Best regards
Ulrich

> Best regards,
> Kern
>
> >
> > Best regards
> > Ulrich
> >
> > p.s. running bacula 7.4.4 community version
> >
> > Ulrich Leodolter <[hidden email]>
> > Oesterreichische Bibliothekenverbund und Service GmbH
> > Raimundgasse 1/3, A-1020 Wien
> > Fax +43 1 4035158-30
> > Tel +43 1 4035158-21
> > Web http://www.obvsg.at
> >
> > ------------------------------------------------------------------------------
> > Developer Access Program for Intel Xeon Phi Processors
> > Access to Intel Xeon Phi processor-based developer platforms.
> > With one year of Intel Parallel Studio XE.
> > Training and support from Colfax.
> > Order your platform today. http://sdm.link/xeonphi
> > _______________________________________________
> > Bacula-devel mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/bacula-devel
> >
>

Ulrich Leodolter <[hidden email]>
Oesterreichische Bibliothekenverbund und Service GmbH
Raimundgasse 1/3, A-1020 Wien
Fax +43 1 4035158-30
Tel +43 1 4035158-21
Web http://www.obvsg.at

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel
Reply | Threaded
Open this post in threaded view
|

Re: enable client or job and scheduler

Kern Sibbald
On 11/11/2016 12:40 PM, Ulrich Leodolter wrote:

> Hi Kern,
>
>> Kern Sibbald <[hidden email]> hat am 11. November 2016 um 10:33 geschrieben:
>>
>>
>> Hello Ulrich,
>>
>> On 11/11/2016 09:52 AM, Ulrich Leodolter wrote:
>>> Hi all,
>>>
>>> it seems that enable client or job does not trigger an update and requeue for the scheduler.
>> The scheduler queue is refreshed approximately once an hour, so if you
>> activate a schedule, it will probably not be noticed until the next refresh.
>>> we use a cron job which dynamically enables/disables workstation jobs 10 minutes before they are scheduled in the evening.  if somewone powers of his workstation on weekend then backup job will be disabled and we get no failed jobs.  on monday evening the job will be enabled if the workstation is alive.  but we noticed that the jobs does not run if it is sheduled 10 minutes later.
>>>
>>> it seems there must be some action on the scheduler between the enable job and the scheduled time or the time between enable and scheduled time must be greater than 1 hour.  at least we observed this behaviour.
>>>
>>> but i would expect that enable job or client triggers also a requeue for the scheduler if there are any assoicated scheduldes.
>> That code does not currently exist.
>>
> Do you think that would be useful ?  then i coud try to develop that code and provided a patch.

I had never thought about this problem before, so yes, I think it would
be useful, and it would even be much better if you provide a patch.  I
haven't looked at the code, but I suspect that it should not be hard to do.

>
>>> is there any command which triggers a rescan for the scheduler?
>> If you run your cron job at least one hour before the job should be
>> scheduled, I think it will work.  If you try that please let me know if
>> it works or not.
>>
> Actually we use this workaround since a few days, and it seems to work.

OK, thanks for the confirmation.

>
> We run the script twice, 1:10h and 10min before all workstation jobs are scheduled in the evening, if someone powers of the machine inbetween the corresponding job will be disabled by the second run.  the scheduler is not updated but it will not start because the enabled flag is checked.
>
> I pushed my simple script to github, it depends on the old bweb perl modules and naming conventions of config files, client names and job names (we are still using a slightly modified bweb against 7.4.4)
>
> https://github.com/uleodolter/bacula/blob/master/scripts/run_CheckUsers

Interesting script.  I am going to show it to the bweb guys.

Best regards,
Kern

>
> Best regards
> Ulrich
>
>> Best regards,
>> Kern
>>
>>> Best regards
>>> Ulrich
>>>
>>> p.s. running bacula 7.4.4 community version
>>>
>>> Ulrich Leodolter <[hidden email]>
>>> Oesterreichische Bibliothekenverbund und Service GmbH
>>> Raimundgasse 1/3, A-1020 Wien
>>> Fax +43 1 4035158-30
>>> Tel +43 1 4035158-21
>>> Web http://www.obvsg.at
>>>
>>> ------------------------------------------------------------------------------
>>> Developer Access Program for Intel Xeon Phi Processors
>>> Access to Intel Xeon Phi processor-based developer platforms.
>>> With one year of Intel Parallel Studio XE.
>>> Training and support from Colfax.
>>> Order your platform today. http://sdm.link/xeonphi
>>> _______________________________________________
>>> Bacula-devel mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/bacula-devel
>>>
> Ulrich Leodolter <[hidden email]>
> Oesterreichische Bibliothekenverbund und Service GmbH
> Raimundgasse 1/3, A-1020 Wien
> Fax +43 1 4035158-30
> Tel +43 1 4035158-21
> Web http://www.obvsg.at
>


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel