Bug 1692425

Summary: Turn on task cleanup ON by default
Product: Red Hat Satellite Reporter: Mike McCune <mmccune>
Component: InstallationAssignee: Mike McCune <mmccune>
Status: CLOSED ERRATA QA Contact: Perry Gagne <pgagne>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: ahumbe, aruzicka, bkearney, chrobert, dvoss, egolov, inecas, pgagne, trichard
Target Milestone: 6.6.0Keywords: PrioBumpField, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: satellite-installer-6.6.0.8-1.beta Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-22 19:49:16 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 Mike McCune 2019-03-25 15:22:41 UTC
We currently leave it up to the customer to enable the task cleanup cron job by hand if they choose to do so during the installation:

# satellite-installer --foreman-plugin-tasks-automatic-cleanup

without this flag, large customers regularly get very large amounts of tasks piling up over the course of a Satellite runtime. This causes:

 * performance issues: as the # of tasks grows in the database, task processing gradually gets slower and slower over time

 * disk consumption: gigabytes of data are generated with large numbers of tasks

 * failed upgrades: often customers will have old stale tasks that appear running but are really dead and cause the customer to have to file tickets, diagnose and determine how to remove these stale tasks, eg:

"""
We are currently testing the upgrade from 6.3.3 to 6.3.5 on our Lab Satellite. We have run the health check command below. Can you provide info as to how we stop the running tasks: 

# foreman-maintain upgrade check --target-version 6.3.z
Running Checks before upgrading to Satellite 6.3.z
--------------------------------------------------------------------------------
Check for paused tasks:                                               [FAIL]
There are currently 1 paused tasks in the system
...

# hammer task list --search 'state = running'
--------------|---------------------|---------|---------|-------------------
ID            | STARTED AT	    | STATE   | RESULT  | TASK ACTION	
--------------|---------------------|---------|---------|-------------------
0dd3a1dcd7a7c | 2019/03/22 10:45:56 | running | pending | Listen on candlepi
68677bb5b1e5c | 2019/03/22 10:45:56 | running | pending | Monitor Event Queu
0228bec74fd50 | 2018/11/12 08:27:03 | running | success | Scan cdn	
--------------|---------------------|---------|---------|-------------------
"""



For example, our internal Scale Lab long term Satellite setup had close to 1,000,000 tasks in the database after running for 30 days as the admin who installed it did not remember to enable this flag.

Task Management is one of our highest case volume areas in Satellite 6 and this would help alleviate some of the issues for long running Satellites.

Comment 13 Bryan Kearney 2019-10-22 19:49:16 UTC
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-2019:3172

Comment 14 Red Hat Bugzilla 2023-09-14 05:25:55 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days