Bug 1318524

Summary: record timestamp of when power commands complete
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: generalAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: dcallagh, dowang, mjia, rjoost
Target Milestone: 24.0Keywords: FutureFeature, Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-21 18:49:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dan Callaghan 2016-03-17 06:58:44 UTC
Currently we have a timestamp showing when a power command was added to the queue (activity.created) but beaker-provision won't run the command straight away so it might be many seconds later that it actually starts and then finishes running. We have no timestamp record for that right now.

There is a column command_queue.updated which might have been intended for this purpose but it's never set apart from defaulting to datetime.datetime.utcnow, which means it's currently always just the same as the creation time.

We want to know the completion time of power commands so that we can show accurate information for recipe installation progress -- for example the timestamp at which the netboot configuration was actually written to disk.

Comment 1 Dan Callaghan 2016-08-08 05:47:52 UTC
I think the first step is to divorce command_queue from the activity hierarchy, the decision to have it inherit from activity has proven to be a mistake.

Then we can clarify the timestamp columns. To be analagous with recipes I guess we could have:
* queue_time (the current created column)
* start_time
* finish_time
and just drop the updated column.

This would also be our opportunity to introduce a proper column for recording the full error message in case of failure (the current new_value column, we would just drop old_value) which is part of bug 968715.

Comment 2 Dan Callaghan 2016-09-05 01:30:51 UTC
http://gerrit.beaker-project.org/5129 separate command_queue table from activity
http://gerrit.beaker-project.org/5185 record start_time and finish_time for power commands

But on thinking about it, I realise that this bug should also include updating the UI to display the new timestamps... so leaving this ASSIGNED for now.

Comment 3 Dan Callaghan 2016-09-07 05:31:20 UTC
This patch shows the new timestamps in the system commands grid (Power tab of the system page):

http://gerrit.beaker-project.org/5196

although I am not really happy with the whole grid approach there, since now we have so many columns that at most viewport widths the error message is going to be tightly wrapped and basically unreadable...

It is really begging for some kind of timeline view, showing the commands in sequence with an icon indicating their status and a bit of info below each one indicating what it is for/where it came from. And with the error message below each failed command. But that's a bigger redesign which will have to come later...

And this patch changes the recipe installation tab to use the actual finish_time instead of queue_time as the timestamp for "Netboot configured":

http://gerrit.beaker-project.org/5198

Comment 8 Dan Callaghan 2017-02-21 18:49:32 UTC
Beaker 24.0 has been released.