Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1465146

Summary: fetching list of applicable errata is slow with if lots of hosts need lots of errata
Product: Red Hat Satellite Reporter: Chris Duryee <cduryee>
Component: Errata ManagementAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.10CC: adprice, andrew.schofield, bbuckingham, bkearney, egolov, ehelms, jcallaha, jsherril, kabbott, oshtaier, sthirugn
Target Milestone: UnspecifiedKeywords: FieldEngineering, PrioBumpField, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-katello-3.0.0.161-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1530699 (view as bug list) Environment:
Last Closed: 2018-02-05 13:54:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1419139, 1480355    
Bug Blocks: 1482208    
Attachments:
Description Flags
6.2.11 patch
none
rhel7_hotfix
none
rhel6_hotfix
none
verification screenshot 1 none

Description Chris Duryee 2017-06-26 19:00:32 UTC
Description of problem:

If you have lots of hosts that need errata, fetching the "applicable" errata can be very slow.

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

How reproducible: every time


Steps to Reproduce:
1. create lots of hosts that have applicable errata, or load up a database with this data
2. go to errata page

Actual results: waiting for minutes if either "applicable" or "installable" are checked

Expected results: page should load within 5-10 seconds

Comment 2 Justin Sherrill 2017-06-29 15:47:03 UTC
Created redmine issue http://projects.theforeman.org/issues/20167 from this bug

Comment 3 Satellite Program 2017-06-29 18:18:21 UTC
Upstream bug assigned to jsherril

Comment 4 Satellite Program 2017-06-29 18:18:24 UTC
Upstream bug assigned to jsherril

Comment 6 Satellite Program 2017-07-13 02:17:04 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20167 has been resolved.

Comment 7 Satellite Program 2017-08-03 22:20:16 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20167 has been resolved.

Comment 8 Justin Sherrill 2017-08-16 15:50:00 UTC
Created attachment 1314237 [details]
6.2.11 patch

Comment 9 Justin Sherrill 2017-08-16 15:52:55 UTC
applying to 6.2.11:

download the patch to /tmp/
cd /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.144/
patch -p1 < /tmp/filename.patch

then restart httpd and foreman-tasks

Comment 11 Adam Price 2017-09-06 21:29:36 UTC
Created attachment 1322818 [details]
rhel7_hotfix

Comment 12 Adam Price 2017-09-06 21:30:13 UTC
Created attachment 1322819 [details]
rhel6_hotfix

Comment 13 Adam Price 2017-09-06 21:35:51 UTC
=== HOTFIX INSTRUCTIONS FOR SATELLITE 6.2.11 ONLY ===

1. Download attached file bz1465146-hotfix-rpms-el7sat.tar.xz or bz1465146-hotfix-rpms-el6sat.tar.xz depending on your Satellite host OS version
2. Stop Satellite
  katello-service stop
3. Extract the tarball and install the packages
4. Start Satellite
  katello-service start

Comment 14 jcallaha 2018-01-13 19:37:18 UTC
Verified in Satellite 6.2.14 Snap 1.

Registered over 5300 content hosts to the satellite, each with 102 applicable errata. Repeated reloads of the errata page took no more than 9 seconds, including refresh time. Average page load time appears to be around 4-4.5 seconds. 

See attached screenshot for load time confirmation.

Comment 15 jcallaha 2018-01-13 22:44:47 UTC
Created attachment 1380829 [details]
verification screenshot 1

Comment 18 errata-xmlrpc 2018-02-05 13:54:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:0273