Bug #27824
closederror 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.
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:
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.
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
Updated by John Mitsch over 5 years ago
- Target version set to Katello 3.14.0
- Triaged changed from No to Yes
Updated by The Foreman Bot over 5 years ago
- Fixed in Releases Katello 3.14.0 added
Updated by Justin Sherrill over 5 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|fd3132a431dd35614a8b6de9993a0083840c6a96.