Bug 1649047 - Default debug export interval to 1 month instead of 6 and maximum 1000 entries
Summary: Default debug export interval to 1 month instead of 6 and maximum 1000 entries
Keywords:
Status: ASSIGNED
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Tasks Plugin
Version: 6.4
Hardware: x86_64
OS: Linux
medium
medium vote
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Peter Ondrejka
URL: https://projects.theforeman.org/issue...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-12 19:00 UTC by Pavel Moravec
Modified: 2019-09-09 03:20 UTC (History)
5 users (show)

Fixed In Version: tfm-rubygem-foreman-tasks-0.14.4.1-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-13 09:20:58 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github sosreport sos pull 1623 None None None 2019-03-27 13:17:22 UTC
Foreman Issue Tracker 25434 None None None 2018-11-13 12:00:24 UTC
Foreman Issue Tracker 26415 None None None 2019-03-20 10:26:06 UTC

Description Pavel Moravec 2018-11-12 19:00:26 UTC
Description of problem:
In case a Satellite generates many (foreman) tasks per day, foreman-debug will 1) take too long to execute, and 2) generate huge *.csv files. That makes troubleshooting of Satellite issues slower. We shall limit task search in 60-dynflow_debug (only? also? rather?) by number of tasks.

Also from the same rank, tasks cleanup should consider (or at least offer option to) deleting all-except-newest N tasks, instead of time-based filter.

Since I expect there is no one solution that fits all, f-d and cleanup should be ideally bit flexible (i.e. "collect X tasks or tasks from past Y days, whatever is smaller" for f-d and similarly for the cleanup).


Version-Release number of selected component (if applicable):
Sat 6.4


How reproducible:
100%


Steps to Reproduce:
1. Generate too many tasks (i.e. tens of thousands) per day.
2. take foreman-debug
3. run tasks cleanup rake script


Actual results:
2. foreman-debug takes hours to complete, tarball is hundreds of MBs of size, *.csv files (tens of) GBs.
3. still too much tasks kept in db


Expected results:
2. f-d to complete in reasonable time, consuming reasonable disk space
3. only considerable number of tasks remain after the cleanup


Additional info:

Comment 1 Pavel Moravec 2018-11-12 19:08:12 UTC
relevant but imho insufficient: https://projects.theforeman.org/issues/25434

Comment 2 Lukas Zapletal 2018-11-13 09:20:58 UTC
Pavel, please don't create BZ for such a thing, just join our conversation on github. This is indeed a great idea, I will add it to the patch immediately. Will show up in Satellite 6.6 then.

Comment 6 pm-sat@redhat.com 2018-12-17 17:04:58 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25434 has been resolved.

Comment 11 Bryan Kearney 2019-03-19 14:03:21 UTC
Upstream bug assigned to lzap@redhat.com

Comment 12 Lukas Zapletal 2019-03-20 10:26:07 UTC
PR pending: https://projects.theforeman.org/issues/26415

Comment 13 Pavel Moravec 2019-03-27 13:17:23 UTC
FYI this has been updated in sosreport since (future) RHEL7.7.


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