Project

General

Profile

Bug #15648

ListenOnCandlepinEvents pauses during manifest import

Added by Justin Sherrill over 2 years ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Category:
Orchestration
Target version:
Difficulty:
medium
Triaged:
Yes
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Due to the fact that the manifest import task as well as the ListenOnCandlepinEvents task both try to import pools and subscriptions, the ListenOnCandlepinEvents task can get a duplicate key constraint pretty easily:

ActiveRecord::RecordNotUnique

PG::Error: ERROR: duplicate key value violates unique constraint "index_katello_pools_on_cp_id" DETAIL: Key (cp_id)=(ff80808155da9ba00155daa109da02db) already exists. : INSERT INTO "katello_pools" ("cp_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" 

"/home/vagrant/git/katello/app/models/katello/glue/candlepin/pool.rb:35:in `import_pool'" 
- "/home/vagrant/git/katello/app/lib/actions/candlepin/import_pool_handler.rb:55:in
  `import_pool'" 
- "/home/vagrant/git/katello/app/lib/actions/candlepin/import_pool_handler.rb:37:in
  `handle'" 
- "/home/vagrant/git/katello/app/lib/actions/candlepin/listen_on_candlepin_events.rb:215:in
  `on_event'" 
- "/home/vagrant/git/katello/app/lib/actions/candlepin/listen_on_candlepin_events.rb:184:in
  `act_on_event'" 
- "/home/vagrant/git/katello/app/lib/actions/candlepin/listen_on_candlepin_events.rb:90:in
  `block in run'" 

1) there may be some way to prevent this we should look into
2) ListenOnCandlepinEvents shouldn't pause anytime there is an error

Associated revisions

Revision 66e98cb7 (diff)
Added by Justin Sherrill over 2 years ago

Fixes #15648 - do not pause on CandlepinEvent errors (#6178)

History

#1 Updated by Justin Sherrill over 2 years ago

  • Bugzilla link set to 1337810

#2 Updated by Brad Buckingham over 2 years ago

  • Pull request https://github.com/Katello/katello/pull/6178 added

#3 Updated by Justin Sherrill over 2 years ago

  • Legacy Backlogs Release (now unused) set to 171

#4 Updated by Justin Sherrill over 2 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

#5 Updated by Eric Helms over 2 years ago

  • Legacy Backlogs Release (now unused) changed from 171 to 162

Also available in: Atom PDF