Bug #2185
closedJob Scheduler PT: for jobs that take less than 5 minutes, there can be a gap in the reporting
Description
When we run a job via the Job Scheduler PT, it is put into the background. When it finished, it's result classes are set for 24 hours exactly.
However, reporting on these classes only happens on the next CFEngine run, ie 5 minutes later. This is fine the first time, but after several executions, there is a run when the command is launched again, but the result classes have already expired.
We need to make these classes last just a little bit longer!
Updated by Jonathan CLARKE almost 13 years ago
OK, actually I misinterpreted this by not reading the dates (doh). It turns out that the gap was not 5 minutes, but 1 day and 5 minutes!
This is because CFEngine does not currently re-set persistent classes... ie, if a "job_success" class is set at 22:30 one day, for 24 hours, then it is set again at 22:29 the next day, CFEngine will say "job_success" is already set, and just ignore the request to set it again.
According to the documentation of 'timer_policy' (see http://cfengine.com/manuals/cf3-reference.html#classes-in-_002a and search for the next occurence of timer_policy), using timer_policy => "reset" (the default) should make this class be set for 24 hours from each time we ask it to be set.
Updated by Jonathan CLARKE almost 13 years ago
I've patched and reported this bug to CFEngine: https://cfengine.com/bugtracker/view.php?id=923
I'll be including the fix in our packages.
Updated by Jonathan CLARKE almost 13 years ago
- Status changed from In progress to Pending technical review
- % Done changed from 0 to 100
Applied in changeset commit:4a39d441a3f30c733eb94ec117f93d6ea8b6c295.
Updated by Jonathan CLARKE almost 13 years ago
Applied in changeset commit:2276c6930b01155b78a4ac48bf096fd1a795c816.
Updated by Matthieu CERDA almost 13 years ago
Well I do not have the complete C source file to try to understand the patch but it looks syntaxically correct, compiles and outputs reports like expected. So all good !
Updated by Jonathan CLARKE almost 13 years ago
- Status changed from Pending technical review to Released