Bug 671333

Summary: Satellite-sync using dump fails when trying to obtain a channel that contains errata with Key wodrs "a,a".
Product: Red Hat Satellite 5 Reporter: Dimitar Yordanov <dyordano>
Component: Satellite SynchronizationAssignee: Michael Mráka <mmraka>
Status: CLOSED DEFERRED QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: low Docs Contact:
Priority: low    
Version: 530   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-04 13:25:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 462714    

Description Dimitar Yordanov 2011-01-21 09:27:14 UTC
Description of problem:
Satellite-sync  using dump fails when trying to obtain a channel that contains errata with Key wodrs "a,a".

Version-Release number of selected component (if applicable):
Satellite 5.3 
spacewalk-java-0.5.44-95

How reproducible:
Always

Steps to Reproduce:
1.Create a custom Channel and Errata(with Keyword "a,b").
2.Export the channel with rhn-satellite-exporter 
3.Copy the dump to another Satellite5.3
4. Modifiy <dump_dir>/erratas/[0-9]+/*.xml.gz in way that "a,b" will be replaced by "a,a".
5.Try to sync the modigied channel to Satellite.
  
Actual results:

Error:
13:57:46 
13:57:46 Importing channel errata
13:57:46    Importing *relevant* errata: chann_last_test_same (1)
            ________________________________________
Downloading:+++ sending log as an email +++

SYNC ERROR: unhandled exception occurred:

(Check logs/email for potentially more detail)

<rhnFault class (code = 54, text = 'ORA-00001: unique constraint (RHNSAT.RHN_ERR_KEYWORD_EID_UQ) violated
')>
(54, 'ORA-00001: unique constraint (RHNSAT.RHN_ERR_KEYWORD_EID_UQ) violated\n', '\n     Package Upload Failed due to uniqueness constraint violation.\n     Make sure the package does not have any duplicate dependencies or\n     does not already exists on the server\n     ')

Expected results:
No errors

Additional info:

If <dump_dir>/erratas/[0-9]+/*.xml.gz  is modified like "a,b" -> "c,d" all goes well.

Probably the problem will be reproducible without modification of  *.xml.gz but this approach is currently blocked by Bug 645363.