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:
relevant but imho insufficient: https://projects.theforeman.org/issues/25434
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.
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25434 has been resolved.
Upstream bug assigned to lzap
PR pending: https://projects.theforeman.org/issues/26415
FYI this has been updated in sosreport since (future) RHEL7.7.