Bug 1968146 - PostgreSQL provisioning fails to parse values with units
Summary: PostgreSQL provisioning fails to parse values with units
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Setup.EngineCommon
Version: 4.4.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact: meital avital
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-06 05:49 UTC by Yedidyah Bar David
Modified: 2022-05-04 08:12 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-05-04 08:12:31 UTC
oVirt Team: Integration
Embargoed:
sbonazzo: ovirt-4.5-


Attachments (Terms of Use)

Description Yedidyah Bar David 2021-06-06 05:49:14 UTC
Description of problem:

When provisioning PostgreSQL, we also check some values in its configuration, so that we can change them if needed.

The code used there is not parsing unit values, if present, failing engine-setup.

Version-Release number of selected component (if applicable):
"Forever" (probably since at least 3.5 or so).

How reproducible:
Always, I think

Steps to Reproduce:
1. Create/edit postgresql.conf with 'work_mem = 8MB'
2. Install ovirt-engine
3. Run engine-setup

Actual results:
Fails with something like [1]:

ValueError: invalid literal for int() with base 10: '8MB'

[1] https://lists.ovirt.org/archives/list/devel@ovirt.org/thread/MX3T5WR6TQMALRE3O767K2FQE222AMWM/

Expected results:
Succeeds

Additional info:
This happens only during provisioning of a new database, which is usually during initial setup of a new engine/dwh machine. Normally, people do not configure postgresql.conf before engine-setup, but rely on engine-setup to do this, which is why we didn't run into this bug so far.

We have similar, but different code, for checking existing values during upgrade. On upgrade, we already have a DB up, and query it, instead of parsing its conf. This was done for bug 1388433.

In EL8, postgresql.conf is in /var/lib/pgsql/data .
If you want it to be created for you before step 1, so that you only need to edit a single value for reproduction/verification, you can run 'postgresql-setup --initdb'.

Comment 1 Sandro Bonazzola 2022-05-04 08:12:31 UTC
Didn't got time to work on this in a year, closing deferred due to capacity.
We may consider reopening if we'll have capacity.


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