Bug 1309530 - recipe start time is a random handful of seconds later than rebooted time
recipe start time is a random handful of seconds later than rebooted time
Product: Beaker
Classification: Community
Component: scheduler (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified (vote)
: 23.0
: ---
Assigned To: Dan Callaghan
: Patch
Depends On:
  Show dependency treegraph
Reported: 2016-02-17 22:33 EST by Dan Callaghan
Modified: 2016-07-07 19:10 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-07-07 19:10:18 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dan Callaghan 2016-02-17 22:33:15 EST
Recipes have an overall start and finish time (start_time and finish_time in the database). Beaker also tracks the timestamp at which the system was successfully rebooted in order to kick off the installation at the beginning of the recipe.

Currently the recipe start time is approximately 0-20 seconds later than the rebooted time, because recipe.start_time is populated by beakerd's update_dirty_jobs thread. It runs in a loop every 20 seconds, and when it finds a recipe which is running but has no start time, it sets the start time to now.

This is particularly noticeable in the new recipe UI, which presents the installation progress including relative timestamps. For all our existing recipes, Beaker claims that the reboot happened a few seconds *before* the recipe started which doesn't make much sense.
Comment 1 Dan Callaghan 2016-02-17 23:49:38 EST
I think the best option is to record the start time as the earliest of rebooted time, first task start time, or now. (Note that for systems without power control, there is no reboot command so there is no rebooted timestamp, the system simply appears and the first Beaker sees is when the system has checked in after booting Anaconda.)

Comment 2 Dan Callaghan 2016-02-19 01:43:57 EST
Patch is merged, but only into results-reporting-improvements-take2 branch for now.
Comment 3 Mike McCune 2016-03-28 18:26:18 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 4 Dan Callaghan 2016-04-05 03:54:50 EDT
The results-reporting-improvements-take3 branch has been merged to develop.
Comment 7 Dan Callaghan 2016-07-07 19:10:18 EDT
Beaker 23.0 has been released.

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