Bug 1563270

Summary: Sync status information is lost after cleaning up old tasks related to sync.
Product: Red Hat Satellite Reporter: raju kumar <rajukuma>
Component: Sync PlansAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Stephen Wadeley <swadeley>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.3.0CC: acomabon, ahumbe, aruzicka, bkearney, egolov, jsherril, ktordeur, mdekan, molasaga, rajukuma, satellite6-bugs
Target Milestone: 6.8.0Keywords: PrioBumpField, PrioBumpGSS, Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.15.0-0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 12:57:24 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 raju kumar 2018-04-03 13:35:05 UTC
Description of problem:
Sync status information is lost after cleaning up old tasks related to sync. For an example -
Suppose we synced five repository 7 days ago and if we go ahead and delete the tasks which were generated during the sync, The status will change from Syncing Complete to Never Synced in Sync Status page of Satellite WebUI.


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


How reproducible: 100%


Steps to Reproduce:
1. Sync any repository, once synced its status will show as Syncing Complete in Sync Status page of Satellite WebUI.
2. Now go ahead and delete that particular task using task id- 
# foreman-rake foreman_tasks:cleanup TASK_SEARCH='id = 4fbe2626-9378-49f4-9923-d86c43cc80e7'  VERBOSE=true
3. Now go ahead and check the Sync Status page of Satellite WebUI, that particular repository's status will get changed to Never Synced.

Actual results: Sync status shows as Never Synced


Expected results: Sync status should be shown as Syncing Complete

Comment 2 Brad Buckingham 2018-04-03 16:47:15 UTC
This is expected behavior.  As observed, the task is what is used for determining the last sync.

Is there a reason this task is being deleted?

Comment 4 raju kumar 2018-04-03 17:09:15 UTC
Hi Brad,

Customer needs to cleanup the old tasks in satellite due to the high number of registered devices and associated operations to each one. They have nearly ~10000 registered devices. That amount will increase to ~50000 in near future, and they do have many tasks for each of them. That will cause performance problems and waste of a lot of unneeded storage, as they don't need maintaining that quantity of what is supposed to be logs of already finished tasks. So for now they are cleaning up the tasks every 14 days. 

They have suggested One possible work around meanwhile the bug is not resolved would be to specify a TASK_SEARCH filter to ignore all the "Sync Repository" tasks.

Comment 9 Justin Sherrill 2019-11-01 21:14:29 UTC
Created redmine issue https://projects.theforeman.org/issues/28188 from this bug

Comment 10 Bryan Kearney 2019-11-19 15:03:57 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28188 has been resolved.

Comment 17 errata-xmlrpc 2020-10-27 12:57:24 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 (Important: Satellite 6.8 release), 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-2020:4366