Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1319309 - duplicate key value violates unique constraint errors
duplicate key value violates unique constraint errors
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
6.0.4
Unspecified Unspecified
unspecified Severity high (vote)
: Beta
: Unused
Assigned To: John Mitsch
jcallaha
http://projects.theforeman.org/issues...
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-18 15:09 EDT by John Mitsch
Modified: 2016-07-27 05:28 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 05:28:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 13085 None None None 2016-04-22 11:38 EDT
Red Hat Product Errata RHBA-2016:1501 normal SHIPPED_LIVE Red Hat Satellite 6.2 Capsule and Server 2016-07-27 08:28:58 EDT

  None (edit)
Description John Mitsch 2016-03-18 15:09:10 EDT
This seems to be related to rails 4, errors that look like

PG::Error: ERROR:  duplicate key value violates unique constraint "index_katello_repository_package_groups_on_pgid_repoid"
DETAIL:  Key (package_group_id, repository_id)=(3, 2) already exists.
: INSERT INTO katello_repository_package_groups (package_group_id, repository_id, created_at, updated_at) VALUES (3, 2, '2016-01-08 14:28:11 UTC', '2016-01-08 14:28:11 UTC'), (4, 2, '2016-01-08 14:28:11 UTC', '2016-01-08 14:28:11 UTC')
409 Conflict

are popping up somewhat randomly.

One way to possibly recreate:
1. create repo, 2. sync repo, 3. create content view, 4. add repo to view, 5. publish view 

also is seen during katello:reset         

possibly race conditions?
Comment 1 John Mitsch 2016-03-18 15:09:12 EDT
Created from redmine issue http://projects.theforeman.org/issues/13085
Comment 2 John Mitsch 2016-03-18 15:09:43 EDT
Note that this is a transient error and will not happen every time you publish a content view
Comment 5 John Mitsch 2016-03-30 12:09:48 EDT
PR open upstream https://github.com/Katello/katello/pull/5902
Comment 6 Bryan Kearney 2016-03-30 14:11:51 EDT
Moving to POST since upstream bug http://projects.theforeman.org/issues/13085 has been closed
-------------
John Mitsch
Applied in changeset commit:katello|c92c13fa113533fc8cf255e9d12038a4069067ec.
Comment 7 jcallaha 2016-04-06 16:46:54 EDT
Verified in Satellite 6.2 Beta Snap 6 Compose 2.

No longer able to reproduce the issue with over 50 publishes and promotions.
Comment 9 errata-xmlrpc 2016-07-27 05:28:00 EDT
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:1501

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