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 #1

Updated by Justin Sherrill over 5 years ago

  • Subject changed from 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. to 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.
Actions #2

Updated by The Foreman Bot over 5 years ago

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

Updated by John Mitsch over 5 years ago

  • Target version set to Katello 3.14.0
  • Triaged changed from No to Yes
Actions #4

Updated by The Foreman Bot over 5 years ago

  • Fixed in Releases Katello 3.14.0 added
Actions #5

Updated by Justin Sherrill over 5 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF