Bug 1117299 - Postgres Plugin - Configuration view and updates target wrong database
Summary: Postgres Plugin - Configuration view and updates target wrong database
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- Other
Version: JON 3.2.2
Hardware: Unspecified
OS: Unspecified
Target Milestone: ER02
: JON 3.3.0
Assignee: Michael Burman
QA Contact: Matt Mahoney
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-08 13:09 UTC by Michael Burman
Modified: 2014-12-11 13:59 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-12-11 13:59:54 UTC
Type: Bug

Attachments (Terms of Use)

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@redhat.com>
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@redhat.com>
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@redhat.com>

Comment 8 Simeon Pinder 2014-09-03 20:31:43 UTC
Moving to ON_QA as available for test with the following brew build:

Note You need to log in before you can comment on or make changes to this bug.