Bug 1509248 - upgrade fails when postgres extension was enabled
Summary: upgrade fails when postgres extension was enabled
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Setup.Core
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ovirt-4.2.0
: ---
Assignee: Simone Tiraboschi
QA Contact: Pavel Stehlik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-03 12:09 UTC by Lucie Leistnerova
Modified: 2018-01-08 13:02 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-08 11:05:11 UTC
oVirt Team: Integration
Embargoed:
rule-engine: ovirt-4.2+
rule-engine: blocker+


Attachments (Terms of Use)

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.


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