This has been fixed upstream, and will be delivered in a future release.
Description of problem:
Capsule sync planning in foreman-tasks sometimes takes too long
Version-Release number of selected component (if applicable):
Steps to Reproduce:
This is so far reported only in large Satellite environments with tens of capsules, tens of thousands of content hosts
1. Publish a content view.
2. Promote the content view to a lifecycle environment which has tens of capsules associated with it, serving a large number of content hosts.
3. Notice in the foreman tasks that the CV sync planning takes a long time (sometimes more than 10 minutes) which causes very high capsule sync times.
The capsule sync task's planning takes too long - sometimes more than 10 minutes.
The capsule sync task's planning should finish quickly.
Ignore the reproducer steps in the Description of the bug. More testing revealed that the number of repos in the content view directly impacts the performance of the sync.
To reproduce this bug consistently:
1. Create a content view with a lot of repos (I had 102 repos)
2. Have two or more capsules
3. Publish/promote Content view and observe the time taken to sync to the capsule(s). You will notice that the capsule sync time increases with the number of content view repos.
This bug was cloned and is still going to be included in the 6.4.3 release. It no longer has the sat-6.4.z+ flag and 6.4.3 Target Milestone Set which are now on the 6.4.z cloned bug. Please see the Clones field to track the progress of this bug in the 6.4.3 release.
Linking up the first of two issues upstream. I'm not 100% if this will cleanly backport to 6.5, we shall see. We may have to do a 3rd fix based on code that is halfway between 6.4 and upstream master.
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25714 has been resolved.