Bug 1273302

Summary: beaker-log-delete does not delete old jobs if they have no finish time (e.g. Cancelled or Aborted)
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: 21CC: dcallagh, dowang, mjia, rjoost
Target Milestone: 22.0Keywords: NeedsTestCase, Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-14 05:32:56 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 2015-10-20 07:48:00 UTC
Description of problem:
If a recipe is Cancelled or Aborted before it ever starts, the finish_time will remain NULL. If that happens, the job will be excluded from beaker-log-delete's regular deletion process because it is filtering based on finish_time.

Version-Release number of selected component (if applicable):
21.1

How reproducible:
we have heaps on beaker-devel

Steps to Reproduce:
1. Create a job with "scratch" retention tag, and then cancel it before it can start the recipe -- finish time should be NULL
2. Wait 30 days *or* if lazy, hack the value of the recipeset.queue_time column in the database to be 30 days in the past
3. Run beaker-log-delete on the server

Actual results:
beaker-log-delete ignores the old cancelled job

Expected results:
Old Cancelled and Aborted jobs should be deleted

Comment 1 Dan Callaghan 2015-10-20 07:49:11 UTC
Correction... we *had* examples of this on beaker-devel but I tested out my patch on there and so there are deleted already. :-)

Comment 2 Dan Callaghan 2015-10-21 06:47:16 UTC
http://gerrit.beaker-project.org/4449

Comment 5 Dan Callaghan 2016-01-14 05:32:56 UTC
Beaker 22.0 has been released.