Bug 579491

Summary: Internal Server Error when calling listSystemChannels
Product: [Retired] Red Hat Network Reporter: John Eckersberg <jeckersb>
Component: RHN/APIAssignee: Stephen Herr <sherr>
Status: CLOSED DUPLICATE QA Contact: Red Hat Network Quality Assurance <rhn-qa-list>
Severity: medium Docs Contact:
Priority: low    
Version: rhn521CC: acarter, jhutar
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-21 20:01:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 616792    
Attachments:
Description Flags
python script to reproduce
none
stack from java01.rhn.qa.ext.intdev.redhat.com none

Description John Eckersberg 2010-04-05 15:11:40 UTC
Created attachment 404494 [details]
python script to reproduce

Description of problem:
Attempting to call listSystemChannels through the API results in HTTP 500 Internal Server Error

Version-Release number of selected component (if applicable):
5.2.1

How reproducible:
Always

Steps to Reproduce:
1. Execute attached python script (reproduce.py) to reproduce in WEBQA
  
Actual results:
xmlrpclib.ProtocolError: <ProtocolError for rhn.webqa.redhat.com/rpc/api: 500 Internal Server Error>

Expected results:
Either -
1.  Returns a proper list with the system channels
or
2.  Returns an xmlrpc fault (similiar to xmlrpclib.Fault: <Fault -208: 'No such system'>) in the event Something Bad happens

Additional info:
See attached stack for server side error

Comment 1 John Eckersberg 2010-04-05 15:12:38 UTC
Created attachment 404495 [details]
stack from java01.rhn.qa.ext.intdev.redhat.com

Comment 2 Stephen Herr 2010-07-21 19:35:57 UTC
Hmm, well the listSystemChannels seems to be working for all the systems I've tried it on. The stack trace you've posted seems to indicate that the query (which does a select based on org_id and system_id) was getting multiple results back. I don't see how that's possible given that system_id is supposed to be unique, and a database refresh seems to have washed the bad data away.

If this arises again feel free to re-open the bug, but for now I'm going to assume that the data just got messed up somehow and everything is working as expected.

Comment 3 Stephen Herr 2010-07-21 19:51:38 UTC
Upon further investigation, this is a result of a very rare but previously-known issue where we get duplicate data in the hardware profile tables. See BZ 235385 or the one it was closed as a dupe of, BZ 237898. 

BZ 237898 has scripts in it to remove the duplicate data from the database, we should run those scripts the next time we release.

Comment 4 Stephen Herr 2010-07-21 20:01:41 UTC
Upon even further investigation, there are no duplicates currently in either webqa or production. So there's no point in running the clean-up script. Closing as a dupe of 235385.

*** This bug has been marked as a duplicate of bug 235385 ***