Bug #29653

upgraded 3.15 katello fails sometimes uploading package profile

Added by Justin Sherrill about 2 years ago. Updated over 1 year ago.

Target version:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:


A user reported here:

an error uploading some package profiles. This uncovered a couple of issues:

  • the epoch of '0' is not handled properly if its not uploaded as a string
  • race conditions resulting in attempting to create installed packages that already exist are not handled properly, the resulting objects could cause the association to host to fail (attempts to insert an installed package id of zero

Associated revisions

Revision 89f83399 (diff)
Added by Justin Sherrill about 2 years ago

Fixes #29653 - fix 0 epoch package profile upload

This resolves a couple of issues:
1. Epochs come in with an epoch of 0 as an integeter,
but the code to calculate nvrea only was checking for a string
2. If we tried to insert an installed package, but got a conflict
likely due to a race condition (but also problem #1), the code
would try to insert an inst. package id of zero, which was not
correct. this adds code to lookup any installed packages in case
a conflict occurs, and log an error if at least one could not be found.
3. Adds a migration to correct 1)

Refs #29653 - use simpler duplicate lookuop

Refs #29653 - handle more installed package issues

  • old dynflow running from 3.14 could lead to inst pkgs
    being created with only nvra
  • switch unique constraint to be on nvrea instead of nvra
    cleaning up duplicates along the way (which should not exist)
  • switch nvrea to be non-nil


#1 Updated by The Foreman Bot about 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request added

#2 Updated by Chris Roberts about 2 years ago

  • Triaged changed from No to Yes
  • Fixed in Releases Katello 3.15.1 added

#3 Updated by The Foreman Bot about 2 years ago

  • Fixed in Releases added

#4 Updated by Justin Sherrill about 2 years ago

  • Status changed from Ready For Testing to Closed

#5 Updated by Jonathon Turel over 1 year ago

  • Fixed in Releases Katello 3.17.0 added
  • Fixed in Releases deleted (Katello 3.15.1)
  • Pull request deleted (

Also available in: Atom PDF