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.
KatelloEventQueue involves the following operations
1) Pick an event thats not in-progress and mark the rest of the duplicate events below it as "in progress"
2) Do the operation
3) Delete all the duplicates
In a large scale environment where over 10's of 1000s of events (with many duplicates) gets queued up in the EventQueue we need a quicker way to handle all 3
The last part seems to delete 1 event at a time instead of deleting the duplicates en masse
To test this
1) create activation key with subs attached
2)Do simultaneou/multiple registers and unregisters in quick succession in the 100s ,
3) sudo su - postgres; psql foreman; select count(*) from katello_events
make sure you have a lot of import_pools running
4) Notice that duplicate events are not immediately cleared after the first event pool. As in they happen slowly
other approach to repro this scenario
1) Stop foreman-tasks
2) foreman-rake console
3) Katello::Pool.first.id
>> 3 #note down the id
4) 30000.times { ::Katello::EventQueue.push_event(::Katello::Events::ImportPool::EVENT_TYPE, 3) }
exit
5) sudo su - postgres; psql foreman; select count(*) from katello_events
make sure you have a lot of import_pools running
6) start foreman-tasks
7) Keep monitoring the counts in katello_events
It takes a long time to clear all the events and go to 0 (5 min in our demo sat)
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:1950
KatelloEventQueue involves the following operations 1) Pick an event thats not in-progress and mark the rest of the duplicate events below it as "in progress" 2) Do the operation 3) Delete all the duplicates In a large scale environment where over 10's of 1000s of events (with many duplicates) gets queued up in the EventQueue we need a quicker way to handle all 3 The last part seems to delete 1 event at a time instead of deleting the duplicates en masse To test this 1) create activation key with subs attached 2)Do simultaneou/multiple registers and unregisters in quick succession in the 100s , 3) sudo su - postgres; psql foreman; select count(*) from katello_events make sure you have a lot of import_pools running 4) Notice that duplicate events are not immediately cleared after the first event pool. As in they happen slowly other approach to repro this scenario 1) Stop foreman-tasks 2) foreman-rake console 3) Katello::Pool.first.id >> 3 #note down the id 4) 30000.times { ::Katello::EventQueue.push_event(::Katello::Events::ImportPool::EVENT_TYPE, 3) } exit 5) sudo su - postgres; psql foreman; select count(*) from katello_events make sure you have a lot of import_pools running 6) start foreman-tasks 7) Keep monitoring the counts in katello_events It takes a long time to clear all the events and go to 0 (5 min in our demo sat)