Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1595301 - After upgrading Satellite to 6.3.1: following error seen PG::Error: ERROR: duplicate key value violates unique constraint "katello_host_installed_packages_h_id_ip_id" DETAIL: Key (host_id, installed_package_id)=(123, 456) already exists.
Summary: After upgrading Satellite to 6.3.1: following error seen PG::Error: ERROR: d...
Keywords:
Status: POST
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hosts - Content
Version: 6.3.1
Hardware: All
OS: All
high
high vote
Target Milestone: Unspecified
Assignee: Eric Helms
QA Contact: Stephen Wadeley
URL:
Whiteboard:
: 1595955 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-26 14:47 UTC by Anand Agrawal
Modified: 2019-03-29 06:35 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 24092 None None None 2018-06-29 17:01:22 UTC

Description Anand Agrawal 2018-06-26 14:47:31 UTC
Description of problem:

After upgrading Satellite, following error is observed

It looks like the client is submitting its package profile twice. 

Possibly two yum installs right after each other or something and it is causing a race condition

ActiveRecord::RecordNotUnique
~~~~
PG::Error: ERROR: duplicate key value violates unique constraint "katello_host_installed_packages_h_id_ip_id" DETAIL: Key (host_id, installed_package_id)=(4058, 28704) already exists. : INSERT INTO katello_host_installed_packages (installed_package_id, host_id) VALUES (28704, 4058), (28672, 4058), (28708, 4058), (28648, 4058), (28687, 4058), (28624, 4058), (28656, 4058), (28571, 4058), (28852, 4058), (28686, 4058), (28685, 4058), (28572, 4058), (28707, 4058), (28598, 4058)
~~~
Version-Release number of selected component (if applicable):
6.3.1

How reproducible:
Customers Environment

Actual results:

In dynflow, below task is skipped hence the error:

Actions::Katello::Host::UploadPackageProfile (skipped)

Expected results:

Above error should not be displayed.

Additional info:

Comment 3 Ivan Necas 2018-06-29 17:01:18 UTC
Connecting redmine issue https://projects.theforeman.org/issues/24092 from this bug

Comment 6 Brad Buckingham 2018-07-05 12:46:01 UTC
*** Bug 1595955 has been marked as a duplicate of this bug. ***

Comment 10 pm-sat@redhat.com 2018-08-15 20:10:02 UTC
Upstream bug assigned to ehelms@redhat.com

Comment 15 Bryan Kearney 2019-01-10 13:14:58 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/24092 has been resolved.


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