Project

General

Profile

Actions

Bug #27824

closed

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.

Added by Justin Sherrill over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
High
Category:
Hosts
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

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

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:

Actions

Also available in: Atom PDF