Bug 1273302 - beaker-log-delete does not delete old jobs if they have no finish time (e.g. Cancelled or Aborted)
beaker-log-delete does not delete old jobs if they have no finish time (e.g. ...
Product: Beaker
Classification: Community
Component: general (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified (vote)
: 22.0
: ---
Assigned To: Dan Callaghan
: NeedsTestCase, Patch
Depends On:
  Show dependency treegraph
Reported: 2015-10-20 03:48 EDT by Dan Callaghan
Modified: 2016-01-14 00:32 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-01-14 00:32:56 EST
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 2015-10-20 03:48:00 EDT
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):

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 03:49:11 EDT
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 02:47:16 EDT
Comment 5 Dan Callaghan 2016-01-14 00:32:56 EST
Beaker 22.0 has been released.

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