Bug 1455262 - Use PostgreSQL JDBC drivers 9.2 on Fedora until regression found on newer versions is fixed
Summary: Use PostgreSQL JDBC drivers 9.2 on Fedora until regression found on newer ver...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Packaging.rpm
Version: 4.1.1.8
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.1.3
: 4.1.3.1
Assignee: Martin Perina
QA Contact: Lukas Svaty
URL:
Whiteboard:
: 1455331 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-24 14:55 UTC by Fabrice Bacchella
Modified: 2017-07-06 13:20 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-06 13:20:41 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.1+
lsvaty: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1324882 0 medium CLOSED [RFE] Support EnterpriseDB flavour of PostgreSQL for all engine dbs 2021-05-01 16:32:33 UTC
Red Hat Bugzilla 1331168 0 unspecified CLOSED engine-setup should check postgresql version compatibility for remote DBs 2021-02-22 00:41:40 UTC
oVirt gerrit 77306 0 master MERGED packaging: Remove dependency on postgresql-jdbc on Fedora 2020-11-05 20:57:18 UTC
oVirt gerrit 77547 0 ovirt-engine-4.1 MERGED packaging: Remove dependency on postgresql-jdbc on Fedora 2020-11-05 20:57:19 UTC

Description Fabrice Bacchella 2017-05-24 14:55:19 UTC
Managing postgres version on ovirt is dangerous.

It requires pg_dump to run the exact same version up to the minor than the pg server. So installation with centralized up to date postgress will need to install yum repository from Postgress and so yum's rpm. For me, it's postgresql94-9.4.11-2PGDG.rhel7.x86_64 :
cat /etc/yum.repos.d/pgdg-94-centos.repo
[pgdg94]
name=PostgreSQL 9.4 $releasever - $basearch
baseurl=https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7.3-$basearch
...


But by doing this, postgresql-jdbc is also coming from the same repo and brake ovirt. It happens to me twice, and I needed to add:
cat /etc/yum.repos.d/pgdg-94-centos.repo
[pgdg94]
...
exclude=postgresql-jdbc

To avoid this problem, two solution:

Provided directly postgresql-jdbc.jar in ovirt's rpm, it's already the case for a lot of them:

lsof -p 12233 | grep REG | grep -e '/usr/share/ovirt-engine/modules/.*\.jar' -e '/usr/share/java/ovirt-engine/.*\.jar' | wc -l
84

Much more than the rpm's provided one:
lsof -p 12233 | grep REG | grep '/usr/share/java/.*\.jar' | grep -v '/usr/share/java/ovirt-engine' | wc -l
26

Another solution is to add in the spec files:
'Requires: postgresql-jdbc < 9.3'

At least it would break during yum upgrade, avoiding fear and despair when oVirt fails to start with a database error.
That solution was proposed by Didi.

Comment 1 Martin Perina 2017-05-25 07:32:17 UTC
Right now any PostgreSQL JDBC drivers newer than 9.2 break engine DAL layer, so we need to prevent using newer JDBC drivers available only on Fedora and ship correct version within engine on Fedora until Fedora packages are fixed.

Comment 2 Martin Perina 2017-05-25 13:14:18 UTC
*** Bug 1455331 has been marked as a duplicate of this bug. ***

Comment 3 Logan Kuhn 2017-06-01 13:06:32 UTC
Same for Centos 7.3.1611, update postgresql-jdbc past 9.2 and it can no longer talk to the database.

Comment 4 Martin Perina 2017-06-01 13:15:04 UTC
(In reply to Logan Kuhn from comment #3)
> Same for Centos 7.3.1611, update postgresql-jdbc past 9.2 and it can no
> longer talk to the database.

Right, we don't officially support any PostgreSQL version other than 9.2 (although except this JDBC drivers issue it should work), so you should use on CentOS only 9.2 provided by OS. Unfortunately Fedora 24 upgraded PostgreSQL to 9.4/9.5 already so we need to stop using RPMs provided by Fedora.

Support for PostgreSQL 9.5 is currently being prepared for oVirt 4.2

Comment 5 Lukas Svaty 2017-06-06 06:42:09 UTC
verified in ovirt-engine-4.1.3.1-0.1.el7.noarch

--> Processing Conflict: ovirt-engine-4.1.3.1-0.1.el7.noarch conflicts postgresql-jdbc >= 9.3


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