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.
On systems with large numbers of registered hosts (20-50,000) there are cases when synchronization events may trigger large volume of entries landing in the katello_events table (40,000+ rows).
The majority of these rows are import_host_applicability events that need to be processed. This processing can often take hours and sometimes an entire day.
Due to load induced in processing all these events, there are times when foreman-tasks gets overloaded and may stop processing entirely and the queue ceases to drain.
We need to optimize the processing time of this queue of events to ensure they can be worked through in a faster manner than is being done now.
Some analysis has taken place that shows that a good portion of the work going through the katello_events table entries is SELECTS/INSERTS/UPDATES to the dynflow_steps table which can often take 100-300ms or more. We may update the routine to reduce this and perform other changes to make this task perform better.
To test a large amount of data for the MonitorEventQueue to process you can do the following:
1) Load data to be processed by the queue:
# foreman-rake console
> 1.times { Katello::Host::ContentFacet.pluck(:host_id).each { |id|::Katello::EventQueue.push_event(::Katello::Events::ImportHostApplicability::EVENT_TYPE, id)} }
Once this completes, monitor progress in the UI on the task details, it will indicate the # of rows processed
2) You can also monitor the count in the database:
# sudo -u postgres psql -d foreman -c 'select count(*) from katello_events;'
count
-------
9331
(1 row)
Once that reaches 0 the processing is complete.
We measured between 30-40% speed improvements in processing items in this queue before this bugfix and after.
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:2927