Red Hat Bugzilla – Bug 219808
RHNSat5 rhnpush failure unique constraint (RHNSAT.RHN_CNP_CID_NID_UQ) violated
Last modified: 2008-10-29 10:49:09 EDT
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
Steps to Reproduce:
1. rhnpush into a channel
Created attachment 143773 [details]
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.
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,
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.
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.
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.
User email@example.com's account has been closed
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.