Bug 1117299

Summary: Postgres Plugin - Configuration view and updates target wrong database
Product: [JBoss] JBoss Operations Network Reporter: Michael Burman <miburman>
Component: Plugin -- OtherAssignee: Michael Burman <miburman>
Status: CLOSED CURRENTRELEASE QA Contact: Matt Mahoney <mmahoney>
Severity: high Docs Contact:
Priority: unspecified    
Version: JON 3.2.2CC: hrupp, mfoley, mmahoney, myarboro, tsegismo
Target Milestone: ER02Keywords: Triaged
Target Release: JON 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-11 13:59:54 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:

Description Michael Burman 2014-07-08 13:09:27 UTC
Description of problem: Postgres plugin configuration view uses the database name given in the connection settings, instead of the one that's being selected in JON. 

When checking configuration of a table, it's possible to edit the same table in a wrong database, or the view doesn't work at all, since the original database did not include this table.


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


How reproducible: Always


Steps to Reproduce:
1. In the postgres connection settings, set database name to postgres and authenticate with super user rights.
2. Open a table in rhq-database
3. View configuration / current, columns are not visible.

Actual results: No columns are visible.


Expected results: Columns should be displayed.


Additional info: If there are two databases with the same tablename and the other one is selected as connection settings database, user might alter wrong database.

Comment 1 Michael Burman 2014-07-08 13:25:39 UTC
Fixed in master 25746f3.

Comment 2 Heiko W. Rupp 2014-07-31 15:23:04 UTC
Setting to modified as this is in release/jon3.3.x

Comment 3 Simeon Pinder 2014-07-31 15:51:58 UTC
Moving to ON_QA as available to test with brew build of DR01: https://brewweb.devel.redhat.com//buildinfo?buildID=373993

Comment 5 Michael Burman 2014-08-04 20:01:53 UTC
BZ 968361 added connection pooling, but the database components (other than the one that's used to connect the PostgreSQL instance) can't use those pooled connections, as PostgreSQL does not support changing database during the connection.

So each database will require a separate connection. This is the supposed behaviour, but it's not working as intended.

Comment 6 Michael Burman 2014-08-04 20:06:30 UTC
Fixed in master:

commit 4f83feeac2d16d707822234f9cb38e5961c6e9a5
Author: burmanm <miburman>
Date:   Mon Aug 4 23:04:09 2014 +0300

    [BZ 1117299] Add missing negation from connection pool selection

Comment 7 Thomas Segismont 2014-08-25 08:52:24 UTC
Cherry-picked over to release/jon3.3.x

commit 1c39afc691db9866259ff8772a16cee16947bb84
Author: burmanm <miburman>
Date:   Mon Aug 4 23:04:09 2014 +0300

    [BZ 1117299] Add missing negation from connection pool selection
    
    (cherry picked from commit 4f83feeac2d16d707822234f9cb38e5961c6e9a5)
    Signed-off-by: Thomas Segismont <tsegismo>

Comment 8 Simeon Pinder 2014-09-03 20:31:43 UTC
Moving to ON_QA as available for test with the following brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=381194