Bug 1588819 - postgresql-setup failed to execute
Summary: postgresql-setup failed to execute
Keywords:
Status: CLOSED DUPLICATE of bug 1588431
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.1.11
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.2.5
: ---
Assignee: Yedidyah Bar David
QA Contact: meital avital
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-07 21:50 UTC by schandle
Modified: 2021-09-09 14:37 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-15 13:41:58 UTC
oVirt Team: Integration
Target Upstream Version:
Embargoed:
lsvaty: testing_plan_complete-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHV-43524 0 None None None 2021-09-09 14:37:57 UTC
Red Hat Knowledge Base (Solution) 3481061 0 None None None 2018-06-07 22:56:06 UTC

Description schandle 2018-06-07 21:50:52 UTC
Description of problem:
While upgrading the manager from 4.1.11 to 4.2.3, the setup 'fails to execute stage 'Misc configuration': Command '/opt/rh/rh-postgresql95/root/usr/bin/postgresql-setup' failed to execute'.  

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

rhevm-4.1.11.2-0.1.el7.noarch 
rhvm-setup-plugins-4.2.9-1.el7ev.noarch
rh-postgresql95-postgresql-9.5.9-1.el7.x86_64
postgresql-9.2.23-3.el7_4.x86_64

How reproducible:
On every attempt to upgrade the manager

1. engine-upgrade-check
2. yum update ovirt*setup\*
3. engine-setup

Steps to Reproduce:
1. engine-setup
2. tried to disable selinux 
3.

Actual results:
[ INFO  ] Upgrading PostgreSQL
[ ERROR ] Failed to execute stage 'Misc configuration': Command '/opt/rh/rh-postgresql95/root/usr/bin/postgresql-setup' failed to execute
[ INFO  ] Yum Performing yum transaction rollback
[ INFO  ] Rolling back to the previous PostgreSQL instance (postgresql).
[ INFO  ] Stage: Clean up
          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20180606140545-7zr0co.log
[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20180606141001-setup.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ ERROR ] Execution of setup failed


Expected results:
To have an upgraded manager to 4.2


Additional info:
Setup log
~~~
2018-05-30 08:56:24,479-0600 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.dbmsupgrade plugin.execute:926 execute-output: ('/opt/rh/rh-postgresql95/r
oot/usr/bin/postgresql-setup', '--upgrade', '--upgrade-from=postgresql') stderr:
 * upgrading from 'postgresql.service' to 'rh-postgresql95-postgresql.service'
 * Upgrading database.
ERROR: pg_upgrade tool failed
ERROR: Upgrade failed.
 * See /var/lib/pgsql/upgrade_rh-postgresql95-postgresql.log for details.

2018-05-30 08:56:24,480-0600 DEBUG otopi.transaction transaction._prepare:66 exception during prepare phase
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/otopi/transaction.py", line 62, in _prepare
    element.prepare()
  File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/postgres.py", line 825, in prepare
    raiseOnError=True,
  File "/usr/lib/python2.7/site-packages/otopi/plugin.py", line 931, in execute
    command=args[0],
RuntimeError: Command '/opt/rh/rh-postgresql95/root/usr/bin/postgresql-setup' failed to execute
2018-05-30 08:56:24,514-0600 DEBUG otopi.context context._executeMethod:143 method exception
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/otopi/context.py", line 133, in _executeMethod
    method['method']()
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/db/dbmsupgrade.py", line 89, in _updateDBMS
    oengcommcons.ProvisioningEnv.OLD_POSTGRES_SERVICE
  File "/usr/lib/python2.7/site-packages/otopi/transaction.py", line 106, in append
    self._prepare(element=element)
  File "/usr/lib/python2.7/site-packages/otopi/transaction.py", line 62, in _prepare
    element.prepare()
  File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/postgres.py", line 825, in prepare
    raiseOnError=True,
  File "/usr/lib/python2.7/site-packages/otopi/plugin.py", line 931, in execute
    command=args[0],
RuntimeError: Command '/opt/rh/rh-postgresql95/root/usr/bin/postgresql-setup' failed to execute
2018-05-30 08:56:24,525-0600 ERROR otopi.context context._executeMethod:152 Failed to execute stage 'Misc configuration': Command '/opt/rh/rh-postgresql95/root/usr/bin/postgresql-setup' failed to execute
~~~

postgresql.log
~~~
-----------------------------
Checking cluster versions                                   ok

*failure*
Consult the last few lines of "pg_upgrade_server.log" for
the probable cause of the failure.

connection to database failed: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/lib/pgsql/.s.PGSQL.5432"?


could not connect to old postmaster started with the command:
"/usr/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "/var/lib/pgsql/data" -o "-p 5432 -b  -c listen_addresses='' -c unix_socket_permissions=0700 -c unix_socket_directories='/var/lib/pgsql'" start
Failure, exiting
~~~
~~~
WARNING:  column "user_role_title" has type "unknown"
DETAIL:  Proceeding with relation creation anyway.
WARNING:  no privileges were granted for "public"
LOG:  received fast shutdown request
LOG:  aborting any active transactions
LOG:  autovacuum launcher shutting down
LOG:  shutting down
LOG:  database system is shut down
LOG:  database system was shut down at 2018-05-29 14:50:11 MDT
FATAL:  the database system is starting up
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started
LOG:  autovacuum: found orphan temp table "pg_temp_11"."tt_vm_pool_group" in database "engine"
LOG:  autovacuum: found orphan temp table "pg_temp_11"."tt_vm_pool_running" in database "engine"
LOG:  autovacuum: found orphan temp table "pg_temp_11"."tt_vm_pool_preresult" in database "engine"
LOG:  autovacuum: found orphan temp table "pg_temp_11"."tt_vm_pool_result" in database "engine"
LOG:  received fast shutdown request
LOG:  aborting any active transactions
LOG:  autovacuum launcher shutting down
LOG:  shutting down
LOG:  database system is shut down
LOG:  could not open configuration file "/var/lib/pgsql/data/pg_hba.conf": Permission denied
FATAL:  could not load pg_hba.conf
LOG:  database system was shut down at 2018-05-29 15:13:57 MDT
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started
~~~

Comment 3 Sandro Bonazzola 2018-06-15 13:41:58 UTC
Closing as duplicate of bug #1588431. If you don't think this is a duplicate, please reopen.

*** This bug has been marked as a duplicate of bug 1588431 ***

Comment 5 Franta Kust 2019-05-16 13:05:43 UTC
BZ<2>Jira Resync


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