Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1608597 - Content Host Applicable Package List page can DOS Satellite
Content Host Applicable Package List page can DOS Satellite
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
6.3.2
Unspecified Unspecified
unspecified Severity high (vote)
: 6.3.3
: Unused
Assigned To: Mike McCune
jcallaha
: PrioBumpField, Triaged
: 1614354 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-07-25 18:31 EDT by Mike McCune
Modified: 2018-08-22 16:07 EDT (History)
3 users (show)

See Also:
Fixed In Version: tfm-rubygem-katello-3.4.5.78-1
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1610424 (view as bug list)
Environment:
Last Closed: 2018-08-22 16:07:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Proposed Patch 001 (1.78 KB, patch)
2018-07-25 18:34 EDT, Mike McCune
no flags Details | Diff
tfm-rubygem-katello-3.4.5.74-2.RHBZ1608597.tar (4.68 MB, application/x-tar)
2018-07-26 17:27 EDT, Mike McCune
no flags Details
verification video (540.79 KB, application/octet-stream)
2018-08-03 14:30 EDT, jcallaha
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 24389 None None None 2018-07-25 18:43 EDT
Red Hat Product Errata RHBA-2018:2550 None None None 2018-08-22 16:07 EDT

  None (edit)
Description Mike McCune 2018-07-25 18:31:08 EDT
1) Take large Satellite installation with 20,000 content hosts
2) Navigate to Content Host -> Pick a host with applicable Errata
3) Click Packages -> Applicable Packages
4) On large installations this page will never return (query takes 4h+ to complete).

During execution of said query, Postgres will consume 20-40GB of disk swapping out the query results, consuming way more resources than it should and slowing overall operations of the Satellite.
Comment 1 Mike McCune 2018-07-25 18:34 EDT
Created attachment 1470560 [details]
Proposed Patch 001
Comment 3 pm-sat@redhat.com 2018-07-25 20:09:02 EDT
Upstream bug assigned to mmccune@redhat.com
Comment 4 pm-sat@redhat.com 2018-07-25 20:09:04 EDT
Upstream bug assigned to mmccune@redhat.com
Comment 5 Mike McCune 2018-07-26 14:58:14 EDT
You can test this even on a Satellite with ~1000-2000 Hosts with applicable errata. The page will take 30-40 seconds to load before this patch.

With this update it will render quickly in under a second.
Comment 6 pm-sat@redhat.com 2018-07-26 16:08:54 EDT
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/24389 has been resolved.
Comment 7 Mike McCune 2018-07-26 17:27:15 EDT
*** Satellite 6.3.2 Hotfix Instructions ***

1) download tfm-rubygem-katello-3.4.5.74-2.RHBZ1608597.tar from bug to Satellite server

2) untar archive

3) rpm -Uvh *.rpm

4) katello-service restart

5) resume operations
Comment 8 Mike McCune 2018-07-26 17:27 EDT
Created attachment 1470886 [details]
tfm-rubygem-katello-3.4.5.74-2.RHBZ1608597.tar
Comment 12 jcallaha 2018-08-03 14:30 EDT
Created attachment 1473222 [details]
verification video

Verified in Satellite 6.3.3 Snap 2.

I setup over 4k content hosts, each with 376 applicable packages.

Following the steps outlined in the initial report, I saw that that load times, of the applicable packages page, only took a couple of seconds. This is significantly lower than the 30s load times expected with only 1000 content hosts.

See attached webm for verification
Comment 13 jcallaha 2018-08-14 13:43:20 EDT
*** Bug 1614354 has been marked as a duplicate of this bug. ***
Comment 14 errata-xmlrpc 2018-08-22 16:07:12 EDT
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/RHBA-2018:2550

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