Bug 1684653 - Content view publish planning in foreman-tasks sometimes takes too long
Summary: Content view publish planning in foreman-tasks sometimes takes too long
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.4.2
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: Lai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-01 18:50 UTC by sthirugn@redhat.com
Modified: 2022-03-23 22:00 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-31 21:23:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
content view publish planning (105.09 KB, image/png)
2019-03-01 18:50 UTC, sthirugn@redhat.com
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 27012 0 Normal Rejected Content view publish planning in foreman-tasks sometimes takes too long 2020-11-24 16:37:28 UTC

Description sthirugn@redhat.com 2019-03-01 18:50:09 UTC
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

Comment 8 Justin Sherrill 2019-07-26 18:29:41 UTC
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.

Comment 10 Justin Sherrill 2020-07-31 21:23:22 UTC
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!


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