Bug 1194790

Summary: Internal Server Error when adding ~10 or more systems to channel from channel's Target Systems tab
Product: [Community] Spacewalk Reporter: Tasos Papaioannou <tpapaioa>
Component: ServerAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.2CC: ahuchcha, cperry, ggainey, liko, satqe-list, tkasparek, xdmoon
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1175939 Environment:
Last Closed: 2015-04-14 19:03:36 UTC Type: Bug
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: 1175939    
Bug Blocks: 465198, 924189, 1207293    

Description Tasos Papaioannou 2015-02-20 18:22:01 UTC
Created attachment 994030 [details]
Patch

+++ This bug was initially created as a clone of Bug #1175939 +++

Description of problem:

When subscribing systems to a channel from the channel's Target Systems tab, each system is processed in turn, and each system's errata cache is updated synchronously. For even a relatively small number of systems, the web UI takes several minutes to complete the action, and returns an Internal Server Error because the session timeout has been exceeded. Reproduced internally with 10 systems subscribed to rhn-tools-rhel-x86_64-server-6, which hung for 3.5 minutes before returning an ISE.

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

spacewalk-java-2.0.2-92.el6sat.noarch

How reproducible:

100%

Steps to Reproduce:
1.) See Description above.

Actual results:

Long delay after submitting action, followed by ISE.

Expected results:

No ISE, submitted action completes quickly.

Additional info:

Changing the subscribe_server_to_channel query in ./java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml to regenerate the errata cache asynchronously reduced the time from 3.5 minutes to 20 seconds (with no ISE) for the reproducer mentioned above. Proposed patch attached.

Comment 1 Tasos Papaioannou 2015-02-20 18:46:01 UTC
BZ 1194790 regenerate errata cache asynchronously when subscribing server to channel #225
https://github.com/spacewalkproject/spacewalk/pull/225

Comment 2 Tomáš Kašpárek 2015-02-26 12:18:50 UTC
Committed patch into Spacewalk: e8c453fe00dc8ef56851e8dfe39cda043144a594

Comment 3 Grant Gainey 2015-03-23 16:59:19 UTC
Moving bugs to ON_QA as we move to release Spacewalk 2.3

Comment 4 Grant Gainey 2015-04-14 19:03:36 UTC
Spacewalk 2.3 has been released. See

https://fedorahosted.org/spacewalk/wiki/ReleaseNotes23