Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1509248

Summary: upgrade fails when postgres extension was enabled
Product: [oVirt] ovirt-engine Reporter: Lucie Leistnerova <lleistne>
Component: Setup.CoreAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED NOTABUG QA Contact: Pavel Stehlik <pstehlik>
Severity: medium Docs Contact:
Priority: high    
Version: 4.2.0CC: bugs, didi, lleistne
Target Milestone: ovirt-4.2.0Keywords: Regression
Target Release: ---Flags: rule-engine: ovirt-4.2+
rule-engine: blocker+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-08 11:05:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lucie Leistnerova 2017-11-03 12:09:52 UTC
Description of problem:
Upgrade from 4.1.7 to 4.2 fails when some postgres extension was enabled. It doesn't need to be used in some database, it's only set in postgres configuration file as shared library.

[ ERROR ] Failed to execute stage 'Misc configuration': Failed to start service 'rh-postgresql95-postgresql'


Version-Release number of selected component (if applicable):
ovirt-engine-4.2.0-0.4.master.el7.noarch

How reproducible: always


Steps to Reproduce:
1. have 4.1 engine installed and running
2. set in /var/lib/pgsql/data/postgresql.conf
shared_preload_libraries = 'pg_stat_statements'
3. upgrade to 4.2

Actual results: engine-setup fails


Expected results: engine-setup successfully upgrades engine

Additional info:
Service error is
postgresql-ctl: FATAL:  could not access file "pg_stat_statements": No such file or directory

Comment 1 Yaniv Kaul 2017-11-08 08:07:04 UTC
Is that a supported change to PG configuration?

Comment 2 Lucie Leistnerova 2017-11-08 08:22:00 UTC
pg_stat_statements is supported postgres module for statistics and debugging from version 9.3. https://www.postgresql.org/docs/9.5/static/pgstatstatements.html
If you mean support in ovirt, I don't know that.

Comment 3 Yaniv Kaul 2017-11-08 11:05:11 UTC
(In reply to Lucie Leistnerova from comment #2)
> pg_stat_statements is supported postgres module for statistics and debugging
> from version 9.3.
> https://www.postgresql.org/docs/9.5/static/pgstatstatements.html
> If you mean support in ovirt, I don't know that.

So you've enabled a 9.3 feature on 4.1.7 (which uses 9.2), we have no idea if it's support on oVirt (generally, no, don't play with the PG configuration of oVirt)...

I'm closing as NOTABUG for the moment. Please reopen if you think differently.

Comment 4 Lucie Leistnerova 2017-11-09 07:17:03 UTC
Problem is not only with pg_stat_statements, it could be any extension enabled with shared_preload_libraries. But I cannot think of some other reasonable extension now.

Comment 5 Yedidyah Bar David 2018-01-08 13:02:12 UTC
A workaround is to remove the extension:

1. Remove in postgresql.conf relevant lines, e.g.:

shared_preload_libraries = 'pg_stat_statements'
pg_stat_statements.*

2. systemctl stop ovirt-engine

And probably dwh etc. if you have them

3. systemctl restart postgresql.service

4. Connect to the databases where you installed the extension, and drop it in each of them, with the following sql command:

=# drop extension pg_stat_statements;

5. systemctl start ovirt-engine

And dwh etc. if you stopped them.

Then try engine-setup again.