Bug 567413

Summary: when using Postgres, when patches are loaded from the DB, they are fully loaded into RAM, rather than streamed, which can cause the Server to run out of heap - workaround for 1.3.1.GA maintenance release
Product: [Other] RHQ Project Reporter: Ian Springer <ian.springer>
Component: ContentAssignee: Ian Springer <ian.springer>
Status: CLOSED CURRENTRELEASE QA Contact: Corey Welton <cwelton>
Severity: medium Docs Contact:
Priority: high    
Version: 1.3CC: ccrouch
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: 2.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-12 16:44:24 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: 557793    
Attachments:
Description Flags
Scenario 2.1 -- still reads "DATABASE" on fresh install. none

Description Ian Springer 2010-02-22 21:47:59 UTC
NOTE: This issue is only for tracking the workaround for 2.3.1. The true fix for 3.0.0 will be tracked using Bug 566235.

Comment 1 Ian Springer 2010-02-22 22:02:37 UTC
The following workarounds have been implemented:

1) Change type to fileystem for CSP content sources w/ no password set.

RHQ SVN, 1.3.1.GA_CP branch, r5290
(updated db-upgrade.xml)

2) Change default type to filesystem in dbsetup data.xml.

JON SVN, 2.3.1.GA_CP branch, r10561
(updated jon-data.xml)


TEST CASES FOR 1)
=================
#1)
a) Install JON 2.3.0.GA. 
b) Do *not* set a username or password on the pre-populated "JBoss Patch Content Source" content source. If a username and password are already set, unset them. Make sure the content source's download mode is set to DATABASE (the default).
c) Upgrade to JON 2.3.1.GA.
d) Go to the "JBoss Patch Content Source" content source. Verify that the download mode has been changed to FILESYSTEM.
#2)
a) Install JON 2.3.0.GA. 
b) Set a username and password on the pre-populated "JBoss Patch Content Source" content source. Make sure the content source's download mode is set to DATABASE (the default).
c) Upgrade to JON 2.3.1.GA.
d) Go to the "JBoss Patch Content Source" content source. Verify that the download mode is still set to DATABASE.

TEST CASE FOR 2)
================
a) Install JON 2.3.1.GA (fresh install - not upgrade). 
b) Go to the pre-populated "JBoss Patch Content Source" content source. Verify that its download mode is set to FILESYSTEM.

Comment 2 Corey Welton 2010-02-23 21:52:13 UTC
Scenario 1.2 Verified.

Comment 3 Corey Welton 2010-02-23 21:59:40 UTC
Given scenario 1.2 - do we have a doco note indicating that users who have their download mode to DATABASE may want to consider changing it to FILESYSTEM?

Comment 4 Corey Welton 2010-02-23 22:09:04 UTC
Scenario 2.1 Fails QA.

After installing new against a fresh db -- one named rhq_567413 to assure that it had never been used before -- Administration > Content > Content Sources > JBoss Patch Content Source, I get the following results:

Type:  	JBossASPatchSource
Name: 	JBoss Patch Content Source
Description: 	All patches provided by the JBoss Subscription
Sync Schedule: 	0 0 3 * * ?
Lazy Load: 	true
Download Mode: 	DATABASE
Creation Date: 	1/14/70, 6:16:48 PM, EST
Last Modified Date: 	1/14/70, 6:16:48 PM, EST
Last Download Error: 	None

Comment 5 Corey Welton 2010-02-23 22:23:31 UTC
Created attachment 395844 [details]
Scenario 2.1 -- still reads "DATABASE" on fresh install.

Comment 6 Corey Welton 2010-02-23 22:36:28 UTC
Back to ASSIGNED

Comment 7 Corey Welton 2010-02-24 16:19:51 UTC
Scenario 1.1 also fails QA.  Without populating the u/p fields, and then performing an upgrade results in "DATABASE" remaining as the download mode.

Comment 8 Ian Springer 2010-02-24 19:46:18 UTC
There was actually one other workaround added:

3) Change default mode to FILESYSTEM when user is creating a new JBoss CSP content source.

TEST CASE FOR 3)
================
Create a new content source of type "JBoss AS Patch Content Source". Verify that the Download Mode field is set to FILESYSTEM by default on the create form.

Comment 9 Ian Springer 2010-02-24 20:05:48 UTC
RHQ SVN, 1.3.1.GA_CP branch, r5295 fixes a couple mistakes in the original fix (r5290) for workaround 1).

Comment 10 Jeff Weiss 2010-02-25 16:10:00 UTC
#1a verified on 2.3.1GA (rev5295)

Comment 11 Jeff Weiss 2010-02-25 16:10:49 UTC
Sorry, #1.1, not #1a

Comment 12 Corey Welton 2010-02-25 17:01:14 UTC
Test case 1.2 verified

Test case 2 fails -- installing a fresh build against a new db results in a "Download Mode:" of "DATABASE".

Comment 13 Jeff Weiss 2010-02-25 18:14:14 UTC
Test #3 fails on oracle (2.3.1GA build), default is still DATABASE.

Comment 14 Corey Welton 2010-02-25 20:06:07 UTC
Third Time's the Charm...?

Test 1.1 passes
Test 1.2 passes

Comment 15 Corey Welton 2010-02-25 20:13:45 UTC
[15:10] <@cswiii> jweiss: did 2 pass, i take it?
[15:10] <@jweiss> cswiii: yep

Note: Test 3 (Comment #8) is not applicable for this bz, after further examination, due to other underlying issue(s).

QA Verified.

Comment 16 Corey Welton 2010-08-12 16:44:24 UTC
Mass-closure of verified bugs against JON.