Bug 678550

Summary: ISE when adding packages to a custom channel
Product: [Retired] Red Hat Network Reporter: Sebastian Skracic <sskracic>
Component: RHN/Web SiteAssignee: Sebastian Skracic <sskracic>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Network Quality Assurance <rhn-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: RHN StableCC: aowens, nbronson, vambati
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: US=7680
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-23 20:23:45 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: 678547    

Description Sebastian Skracic 2011-02-18 11:47:35 UTC
Steps to reproduce:

1. login to rhn.webdev.redhat.com
2. click on channels tab
3. under Software Channel Management - click "create new channel"
4. enter channel name, channel label and channel summary, click "Create Channel" button
5. click packages
6. click add packages
7. in the view select "All managed packages" and click view
8. select all the packages that are listed and click "Add Packages" button


actual result: 500 Error - Internal Server Error
expected result: should be able to add packages to custom channel.

Comment 1 Sebastian Skracic 2011-02-18 11:55:18 UTC
*** Bug 617345 has been marked as a duplicate of this bug. ***

Comment 2 Sebastian Skracic 2011-02-18 12:21:33 UTC
This is very likely caused by race condition between Java and Perl tiers, who all want to insert the same row into rhnSet.  In "normal" environments, usually the Java layer processes the AJAX requests (spawned by clicking on the checkboxes) fast enough to have rhnSet populated before user has clicked on the 'Add' button.  In that case, Perl tier sees those entries populated and decides not to do any more work on them.  However, if Java processing is stuck or simply slow, there is a fair amount of chance that not all AJAX requests will be processed at the time Perl has started the processing of the form submission.  In that situation, Perl will see only part of the user selected checkbox values actually inserted into rhnSet table and it will helpfully try to insert the missing values.  At the same time, Java is trying to insert the same rows on its own.  Most of the time it works without error, given the db and the Java layer is responsive enough.

Comment 3 Sebastian Skracic 2011-02-18 13:55:09 UTC
Fix provided in d12ce181a12c9901163e706f72420548f6d9231c.

Comment 4 Sebastian Skracic 2011-02-18 13:55:21 UTC
And available on WEBDEV.

Comment 5 venkat 2011-02-18 15:51:02 UTC
verified in webdev.

Comment 6 Sebastian Skracic 2011-02-24 10:04:24 UTC
*** Bug 548084 has been marked as a duplicate of this bug. ***

Comment 7 venkat 2011-03-15 15:11:36 UTC
verified in webqa