Bug 642287 - rhnpush into custom channel: ORA-00001: unique constraint (RHNSAT.RHN_CNP_CID_NID_UQ) violated
Summary: rhnpush into custom channel: ORA-00001: unique constraint (RHNSAT.RHN_CNP_CID...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 540
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Milan Zázrivec
QA Contact: Petr Sklenar
URL:
Whiteboard:
Depends On:
Blocks: sat540-blockers
TreeView+ depends on / blocked
 
Reported: 2010-10-12 14:24 UTC by Milan Zázrivec
Modified: 2011-12-18 09:47 UTC (History)
5 users (show)

Fixed In Version: spacewalk-schema-1.2.21-7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-28 14:53:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch for the problem (729 bytes, patch)
2010-10-12 14:24 UTC, Milan Zázrivec
no flags Details | Diff

Description Milan Zázrivec 2010-10-12 14:24:35 UTC
Created attachment 452975 [details]
Patch for the problem

Description of problem:
rhnpush into a custom channel (i.e. non-null organization) will fail with:
...
Error Message:
    ORA-00001: unique constraint (RHNSAT.RHN_CNP_CID_NID_UQ) violated
ORA-06512: at "RHNSAT.RHN_CHANNEL", line 1091
ORA-06512: at line 1
Error Class Code: 23
Error Class Info: Could not update database entry.

as long as you're pushing the same packages that you already have in
another organization (NULL for example).


Version-Release number of selected component (if applicable):
spacewalk-schema-1.2.21-4

How reproducible:
Always

Steps to Reproduce:
1. Satellite 5.4 synchronize rhel-5 base and tools channel
2. Create a custom channel with an arch matching the arch of channels
you've synced in step 1.
3. Try to rhnpush content of a RHN-Tools compose into the custom channel
  
Actual results:
The packages are uploaded into the filer, though the data update fails with
the error pasted above.

Expected results:
rhnpush succeeds.

Additional info:
Problem is in rhnChannelNewestPackageView view:

http://git.fedorahosted.org/git/?p=spacewalk.git;a=commitdiff;h=e1569a9a6a3e27c99f1125b6f5c12c47836947fd

Comment 1 Clifford Perry 2010-10-12 14:33:04 UTC
Schema regression - not good. I know customers upload the same package to multiple orgs - and will complain :/ Approved to get fixed for 5.4 GA.

Comment 2 Clifford Perry 2010-10-12 14:33:49 UTC
Also moved VERIFIED Bug 591291 back to ON_QA to be retested once this fix is done.

Comment 3 Milan Zázrivec 2010-10-12 15:11:14 UTC
spacewalk.git master: c6baad03714602863d7bcd6633a55022b45b315e
satellite.git master: b62eba1705b916bc2c79fcc473eb0a4921d25ded

Comment 4 Milan Zázrivec 2010-10-12 15:29:06 UTC
Forgotten schema upgrade script:

spacewalk.git master: 3d3dc067b6f9ce0bdd04ec9c453f9fb020e861d9
satellite.git master: 914e68676707bd8004419c554f7d5f3f87582ec7

Comment 10 Clifford Perry 2010-10-28 14:48:33 UTC
The 5.4.0 RHN Satellite and RHN Proxy release has occurred. This issue has been resolved with this release. 


RHEA-2010:0801 - RHN Satellite Server 5.4.0 Upgrade
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10332

RHEA-2010:0803 - RHN Tools enhancement update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10333

RHEA-2010:0802 - RHN Proxy Server 5.4.0 bug fix update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10334

RHEA-2010:0800 - RHN Satellite Server 5.4.0
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10335

Docs are available:

http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/index.html 

Regards,
Clifford


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