Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1384548 - [RFE] cronjob to clear old tasks
[RFE] cronjob to clear old tasks
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Tasks Plugin (Show other bugs)
6.2.0
x86_64 Linux
high Severity high (vote)
: Beta
: Unused
Assigned To: Martin Bacovsky
Peter Ondrejka
: FutureFeature, Triaged
: 1429660 (view as bug list)
Depends On:
Blocks: 1122832 1479962
  Show dependency treegraph
 
Reported: 2016-10-13 10:08 EDT by Chris Duryee
Modified: 2018-03-07 08:12 EST (History)
15 users (show)

See Also:
Fixed In Version: foreman-tasks-0.9.6
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-02-21 07:36:49 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3374401 None None None 2018-03-07 08:12 EST
Foreman Issue Tracker 16922 None None None 2016-10-13 14:38 EDT
Github theforeman/puppet-foreman/pull/582 None None None 2017-10-20 00:01 EDT
Red Hat Product Errata RHSA-2018:0336 normal SHIPPED_LIVE Important: Satellite 6.3 security, bug fix, and enhancement update 2018-02-21 17:43:42 EST

  None (edit)
Description Chris Duryee 2016-10-13 10:08:17 EDT
Description of problem:

Satellite 6.2 comes with foreman_tasks:cleanup, a job that will clear old tasks. This works well and helps significantly with issues like slow dashboard loading due to repo sync lookup times, but users need to remember to run the cleanup periodically.

Ideally, if the job was run via cron (similar to orphan task cleanup), users would not hit as many issues related to large numbers of old tasks.

Version-Release number of selected component (if applicable): 6.2.2
Comment 2 Ivan Necas 2016-10-13 14:38:09 EDT
Created redmine issue http://projects.theforeman.org/issues/16922 from this bug
Comment 5 pm-sat@redhat.com 2017-03-15 06:10:03 EDT
Upstream bug assigned to mbacovsk@redhat.com
Comment 6 Lukas Zapletal 2017-07-20 09:15:37 EDT
Please make sure task also deletes all tasks even those which are in error state. I cannot get it working, this does not delete tasks in stopped-error state:

ALL_STATES="pending,scheduled,planning,planned,running,paused,stopped,cancelled"
/usr/sbin/foreman-rake foreman_tasks:cleanup TASK_SEARCH='label != a_label' AFTER='30d' STATES="$ALL_STATES
Comment 7 Eric Helms 2017-07-27 15:38:37 EDT
I think this can be a risky thing to do automatically without user opt-in as this does destroy data. Data a user could be using for auditing, tracking, trends. I've commented on the upstream PR [1] but wanted to include strong consideration for this before we go willy-nilly deleting users data out from under them.

https://github.com/theforeman/foreman-tasks/pull/247#issuecomment-318464803
Comment 8 Chris Duryee 2017-08-08 15:48:43 EDT
I updated the PR, not sure if here or there is a better place for convo but I don't want it in two places.
Comment 10 Adam Ruzicka 2017-08-22 06:19:55 EDT
*** Bug 1429660 has been marked as a duplicate of this bug. ***
Comment 11 pm-sat@redhat.com 2017-09-19 08:10:24 EDT
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16922 has been resolved.
Comment 12 Ivan Necas 2017-09-20 11:44:48 EDT
Moving to assigned, as the original issue was moved back to ready for testing
Comment 13 pm-sat@redhat.com 2017-09-21 06:10:20 EDT
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16922 has been resolved.
Comment 22 errata-xmlrpc 2018-02-21 07:36:49 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:0336

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