Created attachment 1539890 [details] content view publish planning Description of problem: Content view publish planning in foreman-tasks sometimes takes too long Version-Release number of selected component (if applicable): Satellite-6.3.5 Satellite-6.4.2 How reproducible: Always Steps to Reproduce: 1.Create a content view with around 100 yum repos 2.Publish the content view Actual results: Content View publish task planning takes a long time. For a similar content view, time taken for publish task planning (see screenshot on where to find the planning time for publish task) are: Satellite 6.3.5 - 75 seconds Satellite 6.4.2 - 75 seconds Note that this test happened with zero client traffic. Having client traffic to the satellite further increases the planning time. Because of this hammer cv publish users have to wait for a long time to get the foreman task id back. In the example below, it took almost 2 minutes to get the task id back on a satellite server with no client traffic. # date; hammer content-view publish --name rhel7cv --organization-id=21 --async; date Fri Mar 1 13:43:13 EST 2019 Content view is being published with task e1fff9b2-3060-479a-be45-71d3ab54d9e4 Fri Mar 1 13:45:06 EST 2019 Expected results: CV publish planning should happen faster and the task id for the hammer command should be returned sooner. Additional info: A similar bug for CV capsule sync task planning was fixed in BZ1673447
The attached customer case of 15 repos taking ~5 minutes is wildly different than publishing 100 repos taking ~85 seconds. Looking at the sosreport, it looks like their dynflow_tables have quite a bit of data in them. Can we try clearing out some of the old tasks and try the publish again? If that doesn't improve things dramatically, lets grab a database backup and see if we can reproduce their times in house. Satellite 6.6 should have some improvements due to task restructuring within CV Publish, and i believe there is a small change we can make to improve the ~100 repo scenario (but likely won't help a ton with ~15 repos). I wouldn't expect a huge difference from these changes though.
I'm going to close this out as the customer case is closed and we have not been able to reproduce. Please reopen if there is still an issue!