Bug 1578276 - [engine-setup] PostgreSQL conf verification text is broken
Summary: [engine-setup] PostgreSQL conf verification text is broken
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Setup.EngineCommon
Version: 4.2.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.2.4
: ---
Assignee: Yedidyah Bar David
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
: 1543329 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-15 07:36 UTC by Yedidyah Bar David
Modified: 2018-06-26 08:36 UTC (History)
5 users (show)

Fixed In Version: ovirt-engine-4.2.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-26 08:36:59 UTC
oVirt Team: Integration
Embargoed:
rule-engine: ovirt-4.2+
rule-engine: exception+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 91219 0 master MERGED packaging: setup: Fix postgresql conf check message 2020-05-04 18:02:04 UTC
oVirt gerrit 91269 0 ovirt-engine-4.2 MERGED packaging: setup: Fix postgresql conf check message 2020-05-04 18:02:04 UTC

Description Yedidyah Bar David 2018-05-15 07:36:30 UTC
Description of problem:

If engine-setup finds problems with PG's configuration, it emits something like this:

[ ERROR ] Please set:
          autovacuum_vacuum_scale_factor = 0.01
          autovacuum_analyze_scale_factor = 0.075
          autovacuum_max_workers = 6
          work_mem = 8192
          server_version = 9.5.9
         in postgresql.conf on 'None'. Its location is usually /var/lib/pgsql/data , or somewhere under /etc/postgresql* .

This is broken in two ways:

1. You can't set server_version, you have to upgrade (client or server).

2. Some parameters can have larger (or smaller) values than suggested. The tests do work then, but the text does not show this.

We had code to show more specific text, but it was accidentally broken since 4.1.2, with the changes for bug 1388433.

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

4.1.2 and later

How reproducible:

Always

Steps to Reproduce:
1. Try to setup an engine with a remote database with a different version and incompatible parameters (e.g. max_connections=100).
2.
3.

Actual results:

See above.

Expected results:

I think we should separate the message to two parts:

1. Things to be changed in the configuration file

These can be combined to a single text like now. Not sure how best to show the text.

2. Other things

Should have their own text, unrelated to the configuration file.

Additional info:

Comment 1 Yedidyah Bar David 2018-05-15 07:38:14 UTC
Output with the current preliminary version of the linked patch 91219 is:

          Engine database host [localhost]: engine958
          Engine database port [5432]:
          Engine database secured connection (Yes, No) [No]:
          Engine database name [engine]: engine958
          Engine database user [engine]: engine958
          Engine database password:

 [ ERROR ] Please set:
          autovacuum_vacuum_scale_factor = 0.01 ; autovacuum_vacuum_scale_factor required to be at most 0.01
          autovacuum_analyze_scale_factor = 0.075 ; autovacuum_analyze_scale_factor required to be at most 0.075
          autovacuum_max_workers = 6 ; autovacuum_max_workers required to be at least 6
          work_mem = 8192 ; work_mem required to be at least 8192
          max_connections = 150 ; max_connections required to be at least 150
          lc_messages = 'en_US.UTF-8' ; Engine requires lc_messages to be 'en_US.UTF-8'. 
          server_version = 9.5.9 ; Postgresql client version is '9.5.9', whereas the version on engine958 is '9.5.8'. Please use a Postgresql server of version '9.5.9'.
         in postgresql.conf on 'engine958'. Its location is usually /var/lib/pgsql/data , or somewhere under /etc/postgresql* .

Emma - what do you think? How would you prefer to present it? Thanks.

Comment 2 Yedidyah Bar David 2018-05-15 08:23:43 UTC
(In reply to Yedidyah Bar David from comment #0)
>          in postgresql.conf on 'None'. Its location is usually

Also "'None'" should be fixed.

Comment 3 Yedidyah Bar David 2018-05-15 08:25:18 UTC
Emma - please ignore comment 1. I updated the patch. Current output is:

          Engine database host [localhost]: engine958
          Engine database port [5432]: 
          Engine database secured connection (Yes, No) [No]: 
          Engine database name [engine]: engine958
          Engine database user [engine]: engine958
          Engine database password: 
[ ERROR ] Postgresql client version is '9.5.9', whereas the version on 'engine958' is '9.5.8'. Please use a PostgreSQL server of version '9.5.9'.
         Please note the following required changes in postgresql.conf on 'engine958':
           'autovacuum_vacuum_scale_factor' is currently '0.2'. It is required to be at most '0.01'.
           'autovacuum_analyze_scale_factor' is currently '0.1'. It is required to be at most '0.075'.
           'autovacuum_max_workers' is currently '3'. It is required to be at least '6'.
           'work_mem' is currently '4096'. It is required to be at least '8192'.
           'max_connections' is currently '100'. It is required to be at least '150'.
           'lc_messages' is currently 'de_DE.UTF-8'. Engine requires lc_messages to be 'en_US.UTF-8'. .
         postgresql.conf is usually in /var/lib/pgsql/data, /var/opt/rh/rh-postgresql95/lib/pgsql/data, or somewhere under /etc/postgresql* . You have to restart PostgreSQL after making these changes.

Comments/suggestions are welcome.

Comment 4 Emma Heftman 2018-05-21 10:37:28 UTC
(In reply to Yedidyah Bar David from comment #3)
> Emma - please ignore comment 1. I updated the patch. Current output is:
> 
>           Engine database host [localhost]: engine958
>           Engine database port [5432]: 
>           Engine database secured connection (Yes, No) [No]: 
>           Engine database name [engine]: engine958
>           Engine database user [engine]: engine958
>           Engine database password: 
> [ ERROR ] Postgresql client version is '9.5.9', whereas the version on
> 'engine958' is '9.5.8'. Please use a PostgreSQL server of version '9.5.9'.
>          Please note the following required changes in postgresql.conf on
> 'engine958':
>            'autovacuum_vacuum_scale_factor' is currently '0.2'. It is
> required to be at most '0.01'.
>            'autovacuum_analyze_scale_factor' is currently '0.1'. It is
> required to be at most '0.075'.
>            'autovacuum_max_workers' is currently '3'. It is required to be
> at least '6'.
>            'work_mem' is currently '4096'. It is required to be at least
> '8192'.
>            'max_connections' is currently '100'. It is required to be at
> least '150'.
>            'lc_messages' is currently 'de_DE.UTF-8'. Engine requires
> lc_messages to be 'en_US.UTF-8'. .
>          postgresql.conf is usually in /var/lib/pgsql/data,
> /var/opt/rh/rh-postgresql95/lib/pgsql/data, or somewhere under
> /etc/postgresql* . You have to restart PostgreSQL after making these changes.
> 
> Comments/suggestions are welcome.

Hi Didi
Please change to:
The maximum allowed value is xxx....
The minimum allowed value is xxx

Comment 5 Lucie Leistnerova 2018-06-06 07:37:41 UTC
engine-setup postgres configuration output is like in Comment 3 and that seems alright.
Postgres version error shows only when X.Y version differs.

Changes that Emma suggested will not be implemented yet. If they are necessary, please open another BZ.

verified in ovirt-engine-setup-4.2.4.1-0.1.el7.noarch

Comment 6 Yedidyah Bar David 2018-06-25 08:05:56 UTC
*** Bug 1543329 has been marked as a duplicate of this bug. ***

Comment 7 Sandro Bonazzola 2018-06-26 08:36:59 UTC
This bugzilla is included in oVirt 4.2.4 release, published on June 26th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.4 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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