Bug 219808 - RHNSat5 rhnpush failure unique constraint (RHNSAT.RHN_CNP_CID_NID_UQ) violated
RHNSat5 rhnpush failure unique constraint (RHNSAT.RHN_CNP_CID_NID_UQ) violated
Status: CLOSED DUPLICATE of bug 429777
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Pradeep Kilambi
Brandon Perkins
Depends On:
  Show dependency treegraph
Reported: 2006-12-15 10:55 EST by Matt Domsch
Modified: 2008-10-29 10:49 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-10-29 10:21:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
traceback.txt (49.71 KB, text/plain)
2006-12-15 10:55 EST, Matt Domsch
no flags Details
rhn.bz2 mbox file (391.47 KB, application/octet-stream)
2006-12-15 11:12 EST, Matt Domsch
no flags Details

  None (edit)
Description Matt Domsch 2006-12-15 10:55:40 EST
Description of problem:
I created a clone of each of the RHEL5 Server i386 and x86_64 channels and tried
to push new snapshot RPMs into those channels using rhnpush.  It failed after
uploading a lot of packages with the above error and traceback.

Further satellite-sync runs succeed fine.

Version-Release number of selected component (if applicable):
RHN Satellite Server beta 4.9

How reproducible:

Steps to Reproduce:
1. rhnpush into a channel

Actual results:

Expected results:

Additional info:
Comment 1 Matt Domsch 2006-12-15 10:55:41 EST
Created attachment 143773 [details]
Comment 2 Matt Domsch 2006-12-15 11:12:12 EST
Created attachment 143778 [details]
rhn.bz2 mbox file

in fact, a lot of unique constraints were violated.  29 tracebacks were sent to
my email.  I attach an mbox file (bz2 compressed) with all of them.
Comment 3 Pradeep Kilambi 2006-12-15 13:04:48 EST
I have seen this issue before. This is due to a race condition, usually happens
when we try to repush a redhat owned package(with null on server) as a non-null
org . This results in a situation where the package to be uploaded is
available on that particular channel with same nvrea but different orgs.

So as it has different orgs it calculates a new packageid for this package and
hence uploads the same package with different pids into the rhnchannelPackage
 table and so does insert it as a new package.

Now in the next step when it calls rhn_channel.refresh_newest_package,
it does :
inserts a row into rhnChannelNewestPackage with channel_id, name_id, evr_id,
package_id, package_arch_id.
and thats when it hits the uniqueness constraint error ...

I already have a bugzilla aligned to this:

looks like you are hitting the same case here.

Comment 4 Pradeep Kilambi 2006-12-15 13:40:57 EST
So What I think is happening is, when you created a clone channel for
RHEL5Server i386/x86_64 that already has a RHEL5 Server i386 and x86_64 related
packages(which it probably does as its cloning) you cannot repush these packages
with your orgid as the packages in the cloned channel will probably have the
same org as its parent(which is different from whatever yours is) and hence the

Ideally rhnpush should not allow you to do that and throw an exception.

one question I want to ask is, why are you trying to repush RHEL5 Server
packages when you cloned it. Cloning basically mirrors the original channel, so
it should already have rhel5 server i386 and x86 packages same as parent channel.
Comment 5 Matt Domsch 2006-12-16 09:24:36 EST
RHN isn't carrying updated content for RHEL5 beta (e.g. the weekly snapshots we
can get being a Red Hat development partner).  For our testers that want to use
the RHN Satellite to keep their systems-under-test current, either I need to
have a channel on the satellite or need to set up a local yum repo for the new
weekly content.  Hence a rawhide channel I made.
Comment 6 Red Hat Bugzilla 2007-04-11 22:06:51 EDT
User bnackash@redhat.com's account has been closed
Comment 8 Matt Domsch 2008-10-29 10:21:55 EDT
These have been open for years with no investigation or resolution.  Since then the code base has moved on significantly, such that many of these no longer would apply to the current spacewalk code.  I'm closing these requests in the hope they're no longer necessary, or if they are, they'll get discovered anew.

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