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 1729049 - List all hosts in an organization takes long time when there is a lot of reports.
Summary: List all hosts in an organization takes long time when there is a lot of repo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: SCAP Plugin
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.6.0
Assignee: Hao Chang Yu
QA Contact: Sanket Jagtap
URL:
Whiteboard: hotfix_delivered
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-11 09:46 UTC by Hao Chang Yu
Modified: 2019-11-05 19:27 UTC (History)
9 users (show)

Fixed In Version: tfm-rubygem-foreman_openscap-1.0.5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-22 12:47:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Hotfix RPM for Satellite 6.4.4 (589.70 KB, application/x-rpm)
2019-10-08 16:30 UTC, wclark
no flags Details
Hotfix RPM for Satellite 6.5.3 (352.90 KB, application/x-rpm)
2019-10-31 15:09 UTC, wclark
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 27332 0 Normal Closed List all hosts page in an organization takes long time when there is a lot of reports 2020-03-24 17:26:08 UTC
Github theforeman foreman_openscap pull 402 0 'None' closed Fixes #27332 - Speed up the Arf reports loading for host 2020-03-24 17:26:08 UTC
Red Hat Product Errata RHSA-2019:3172 0 None None None 2019-10-22 12:48:01 UTC

Description Hao Chang Yu 2019-07-11 09:46:34 UTC
Description of problem:
Satellite is taking long time to load the All Host page in an organization when there is a lot of reports.

There is a default scope in "app/models/foreman_openscap/arf_report.rb"

    default_scope do
      with_taxonomy_scope do
        order("#{self.table_name}.created_at DESC")
      end
    end

With "Organization.current" set, the above function will try to filter the reports by organization. This seems to cause ruby to take long time to construct a list of report ids in an organization to be filtered when there is a lot of reports in an organization.


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


Steps to Reproduce:
1. Need to have many content hosts that run openscap scan and upload the reports to the Satellite.
2. Make sure "Any organization" is set
3. Go to Hosts -> All Hosts page
4. The page should finish loading within an acceptable time.
5. Now, set the organization.
6. Refresh the "All Hosts" page again
7. The page will take several minutes to load.

Actual results:
"All hosts" page takes long time to load

Expected results:
"All hosts" page should finish loading within an acceptable time.

Comment 5 Bryan Kearney 2019-07-23 12:01:35 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/27332 has been resolved.

Comment 6 S.Schwiedel 2019-07-31 11:26:19 UTC
I don`t think that this bug solves the issue itself. 
Loading ARF report data while opening the "All Hosts" or "Content Hosts" Page doesn`t require any report data.
The mentioned foreman_openscap fix may speed up the page loading time but the loading of all reports still generate I/O and latency for data which is not really required for the page view.

Comment 8 S.Schwiedel 2019-08-07 05:16:52 UTC
The dev clarified the behavior. The status icon in the hostlist has a mouseover window with information about the compliance status. This is the reason why they load all ARF Reports in the hostlist.

Comment 12 wclark 2019-10-08 16:30:52 UTC
Created attachment 1623517 [details]
Hotfix RPM for Satellite 6.4.4

A hotfix is available for Satellite 6.4.4. Installation instructions:

1. Download attached hotfix RPM and copy it to Satellite server

2. yum localinstall /path/to/hotfix/RPM

3. # systemctl restart httpd

Comment 14 errata-xmlrpc 2019-10-22 12:47:50 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-2019:3172

Comment 15 Mihir Lele 2019-10-29 05:45:20 UTC
Hello,

I have a customer(case 02500259) who is requesting hotfix for 6.5.

Can we have a hotfix for that too?

regards,
Mihir

Comment 16 wclark 2019-10-31 15:09:29 UTC
Created attachment 1631086 [details]
Hotfix RPM for Satellite 6.5.3

Hotfix is available for Satellite 6.5.3.

To install:

1. Take a backup or snapshot of Satellite server

2. Download Hotfix RPM for version 6.5.3 from this BZ and copy it to Satellite server

3. rpm -Uvh /path/to/hotfix/rpm

4. systemctl restart httpd


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