Bug 1425471

Summary: Satellite 6.1 does not clean finished tasks by default
Product: Red Hat Satellite Reporter: Lukas Zapletal <lzap>
Component: Tasks PluginAssignee: Martin Bacovsky <mbacovsk>
Status: CLOSED WONTFIX QA Contact: jcallaha
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1.11CC: bbuckingham, bkearney, inecas, jcallaha, mmccune, peter.vreman
Target Milestone: UnspecifiedKeywords: PrioBumpField, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-19 12:45:47 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 Lukas Zapletal 2017-02-21 14:04:13 UTC
It looks like default installation of Satellite does not clean finished tasks. This makes listing and management of tasks harder. This is a request to setup Satellite in a way that all finished and irrelevant tasks are automatically deleted after a week timeframe.

There are some rake tasks already (Satellite 6.2 only) but these are not run from cron:

[root@tyan-gt24-12 ~]# foreman-rake foreman_tasks:cleanup:config
Global period for cleaning up tasks is not set
The following actions are configured to be deleted automatically after some time:
name                                               delete after
Actions::Foreman::Host::ImportFacts                30d
Actions::Foreman::Puppetclass::Import              30d

These defaults are not sane, no global cleanup period is set so the rake task will actually do not do the job.

Consider using some sane values, it does not make sense to cleanup tasks after ONE YEAR (upstream default), the sane default is one week for global setting and one day for very frequent tasks.

Foreman tasks job is not doing records, if needed the cleanup task can be creating a logfile of all tasks deleted with some information for recording purposes, but database should be clean.

More details at:

https://github.com/theforeman/foreman-tasks#tasks-cleanup

TRIAGE NOTES: This is not big change to do, yet it will increase USER EXPERIENCE. Customers will not need to browse through thousands of pages of finished tasks when resolving tasks errors, listings via CLI will be more usable.

Once this is resolved, please backport this into Satellite 6.1. There are customers stuck at this version.

Comment 2 Ivan Necas 2017-02-21 16:12:50 UTC
Connecting redmine issue http://projects.theforeman.org/issues/16922 from this bug

Comment 3 Ivan Necas 2017-02-21 16:13:51 UTC
Putting on our current iteration

Comment 4 Peter Vreman 2017-02-24 15:55:24 UTC
Is this not a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1384548?

Comment 5 Satellite Program 2017-03-15 10:12:29 UTC
Upstream bug assigned to mbacovsk

Comment 6 Lukas Zapletal 2017-03-27 08:14:07 UTC
It is indeed Peter.

Martin I suggest to turn one into 6.1 bug, I think this is very important issue and we have customers in the field with 6.1 instances with database full of old tasks. We need to backport into 6.1 as well. Thanks!

Comment 9 Bryan Kearney 2017-05-19 12:45:47 UTC
We will not be addressing this bug in the 6.1 code base. If you have concerns with this, please feel free to reach out to me with any concerns or issues you may have. Thank you.