[ovirt-users] engine-setup failed because of postgres 9.4

Yedidyah Bar David didi at redhat.com
Thu Dec 10 12:51:04 UTC 2015


On Thu, Dec 10, 2015 at 1:43 PM, Fabrice Bacchella
<fabrice.bacchella at orange.fr> wrote:
> I'm on a RHEL 7, trying to install a ovirt 3.6.0.3.
>
> The database used is on a remote server, using a postgres 9.4.
>
> The backup of the previous database fails with :
> 2015-12-10 12:04:13 DEBUG
> otopi.**FILTERED**_engine_setup.engine_common.database database.backup:661
> db backup res {'result': [{'stderr': 'pg_dump: server version: 9.4.5;
> pg_dump version: 9.2.14\npg_dump: aborting because of server version
> mismatch\n', 'rc': 1}], 'stdout': ''}
>
> But the good pg_dump is in the path:
>
> ~# type pg_dump
> pg_dump is /usr/pgsql-9.4/bin/pg_dump
>
> Although in the log file:
>
> 2015-12-10 12:40:19 DEBUG otopi.context context.dumpEnvironment:510 ENV
> COMMAND/pg_dump=str:'/bin/pg_dump'
>
> Why ? How can I enforce the use of the latest pg_dump without rewrinting the
> '/bin/pg_dump' which is owned by the official postgres package ?

otopi ignores the PATH in env.

It defaults to:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

You can change that by something like:
cat << __EOF__ > /etc/ovirt-engine-setup.conf.d/99-my-path.conf
[environment:default]
SYSTEM/commandPath=str:/usr/pgsql-9.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
__EOF__

Or just pass on the command line:

engine-setup --otopi-environment='SYSTEM/commandPath=str:/usr/pgsql-9.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'

grep for commandPath in the log file to see that it worked.

Never tried this myself, though. You might face problems also with pg libraries,
including making psycopg2 use your own libs. Please report about
success/failure/problems.
Thanks.

Good luck,
-- 
Didi



More information about the Users mailing list