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 1236779 - content host registration indexes host collection information needlessly
Summary: content host registration indexes host collection information needlessly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: jcallaha
URL:
Whiteboard:
Depends On:
Blocks: 1237367
TreeView+ depends on / blocked
 
Reported: 2015-06-30 01:36 UTC by Justin Sherrill
Modified: 2019-09-25 21:16 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1237367 (view as bug list)
Environment:
Last Closed: 2016-07-27 08:53:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
production.log filtered (21.46 KB, text/plain)
2015-11-23 18:58 UTC, jcallaha
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1500 0 normal SHIPPED_LIVE Red Hat Satellite 6.2 Base Libraries 2016-07-27 12:24:38 UTC

Description Justin Sherrill 2015-06-30 01:36:21 UTC
Description of problem:

Currently content host creation/registration indexes host collections  and activation keys as part of its creation.  This is extremely slow mainly due to the fact that the host collection's index in Elasticsearch stores the names of every content host associated. If there are thousands of systems in the collection this could take a long time.  In addition, it is not using .pluck() to gather the names, its simply calling  group.systems.map(&:name) which would be very slow given a large number of systems



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


How reproducible:

Always


Steps to Reproduce:
1.  Create an activation key and associate it to a host collection
2.  Register 10,000 systems to the host collection,  with a lot of concurrent registrations


Actual results:
Some registrations may take over 2 minutes, even timing out

Expected results:
Registrations should take less than 2 minutes

Additional info:

Comment 6 jcallaha 2015-11-23 18:57:47 UTC
Verified. 

Steps:
1. Included elastic search logging in production.log
2. Created a Host Collection
3. Associated the collection with an activation key
4. Registered multiple hosts with the key

Results:
production.log shows that elastic search no longer makes a call to ::host_collection
See attached file for more details.


  RELEASE: Red Hat Enterprise Linux Server release 7.2 (Maipo)
  FOREMAN: 1.7.2
SATELLITE: 6.1.4
     RUBY: ruby 2.0.0p598 (2014-11-13) [x86_64-linux]
   PUPPET: 3.6.2

Comment 7 jcallaha 2015-11-23 18:58:25 UTC
Created attachment 1097825 [details]
production.log filtered

Comment 10 errata-xmlrpc 2016-07-27 08:53:19 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/RHBA-2016:1500


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