Project

General

Profile

Bug #20532

candlepin event listener does not release messages after error

Added by Justin Sherrill almost 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Subscriptions
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1440235

Description of problem:

The candlepin event listener will call 'acknowledge' on messages that it processes, but does not call 'release' or 'reject' on messages that it is unable to process.

This can cause some messages to become stuck in the katello_event queue, since they are being held but will never be released.

The best behavior may be to just log the message and then reject it, so potentially bad messages do not get reprocessed over and over.

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

How reproducible: not sure how to repro yet

note: I put this under the 'hosts' component but I'm not sure if that is the best place for this to live. It is related to the ListenOnCandlepinEvents task.

Associated revisions

Revision 6f9ecbfb (diff)
Added by Justin Sherrill almost 5 years ago

Fixes #20532 - acknowledge all candlepin messages

This solves two different issues, after every 100 messages
recieved that match the subjects we look for, we would
sleep for a second instead of

a) acknowledging the message
b) performing some action on that messsage

This makes two changes to ensure that all messages are
acknowledged and the sleep isn't performed until after
messages are acted upon.

History

#1 Updated by The Foreman Bot almost 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/6900 added

#2 Updated by Pavel Moravec almost 5 years ago

Nondeterministc reproducer (not real user story, but worth for developers/testers):

1) stop foreman-tasks service (to populate katello_event_queue a bit)
2) generate several hundreds candlepin events (i.e. (un)register a Content Host with an activation key, or remove all and attach back a subscription pool to another Host) - do that in a loop until katello_event_queue has few hundreds of messages
3) start foreman-tasks service - leave step 2) running (at least I did so, it might but not need to be important)
4) Once ListenOnCandlepinEvents task consumes the backlog, check if katello_event_queue has zero queue depth (see #c7)
5) if there some messages constantly acquired but not acknowledged, you got it. Otherwise, goto step 1).

#3 Updated by Brad Buckingham almost 5 years ago

  • Target version set to 208

#4 Updated by Justin Sherrill almost 5 years ago

  • Assignee changed from Eric Helms to Justin Sherrill

#5 Updated by Justin Sherrill almost 5 years ago

  • Legacy Backlogs Release (now unused) set to 286

#6 Updated by Brad Buckingham almost 5 years ago

  • Target version changed from 208 to 213

#7 Updated by Eric Helms almost 5 years ago

  • Legacy Backlogs Release (now unused) changed from 286 to 295

#8 Updated by Justin Sherrill almost 5 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF