Bug 658503

Summary: Inventory jobs do not put info into "History"
Product: [Retired] Beaker Reporter: Sean Waite <swaite>
Component: inventoryAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 0.5CC: bpeck, jnicolet, mcsontos, rmancy
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-09 04:20:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sean Waite 2010-11-30 15:10:49 UTC
Description of problem:
After an inventory job has been provisioned, and successfully run, the only indication available as to whether or not it ran successfully is if previously incomplete fields are populated.

How reproducible:
100%


Steps to Reproduce:
1. Provision an inventory job
2. Wait for install to complete
  
Actual results:
Job completes, if the key/value and details tabs are already populated, there is no indication to show that the information has potentially changed.

Expected results:
The Inventory scripts should add a line into the History tab saying that the script has been run successfully.

Comment 1 Dan Callaghan 2010-12-05 23:10:14 UTC
My first go at this is here:

http://git.fedorahosted.org/git/?p=beaker.git;a=commitdiff;h=24acacdb1308a5a80792c6f99b10f379bc249ba5

It sucks for a number of reasons:

1. All the different ways in which a system can be modified go through essentially separate code paths. This change just makes that worse.

2. Related to 1, I don't think the checksum and modification time are being correctly updated in all cases.

3. I couldn't find a sensible way of representing the old or new values for CPU and NUMA, so this just records an entry in system history saying "Changed" with no details. Similarly, for devices I just record the added/removed device id (by which I mean, id in beaker's device table) instead of any more useful details about the device.

4. This spams the hell out of the system history for key-value changes, since right now every key-value gets removed and readded.

I will spend some more time on this today to hopefully resolve 2 and 4.

Comment 2 Dan Callaghan 2010-12-06 00:40:04 UTC
(In reply to comment #1)
> 4. This spams the hell out of the system history for key-value changes, since
> right now every key-value gets removed and readded.

This one is now fixed:
http://git.fedorahosted.org/git/?p=beaker.git;a=commitdiff;h=8da518e3a38237f09edceaecbb04219171019a3e

Comment 3 Dan Callaghan 2010-12-06 06:06:58 UTC
(In reply to comment #1)
> 2. Related to 1, I don't think the checksum and modification time are being
> correctly updated in all cases.

Here is the fix for checksum:
http://git.fedorahosted.org/git/?p=beaker.git;a=commitdiff;h=ad95908c220c6b21c097566d9b8eeaca47a81c84

And for date_modified:
http://git.fedorahosted.org/git/?p=beaker.git;a=commitdiff;h=48add6200e49466a25023146c25462bf96d43055

Although now that I think about it, I'm no longer sure that this is going to do the right thing for checksum. I must remember to bring this up in our meeting tomorrow...

Comment 4 Dan Callaghan 2010-12-06 22:05:44 UTC
As per our discussion I'm going to put this in 0.6.0 as is, and for 0.6.1 work on (a) making it nicer and (b) clearing checksum more consistently.