Bug 1469974 - engine-setup fails due to some : Command '/usr/share/ovirt-engine/dbscripts/schema.sh' failed to execute
Summary: engine-setup fails due to some : Command '/usr/share/ovirt-engine/dbscripts/s...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Eli Mesika
QA Contact: meital avital
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-12 07:49 UTC by Tareq Alayan
Modified: 2019-04-28 14:12 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-12 08:50:26 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
engine-setup-log (2.26 MB, text/plain)
2017-07-12 07:50 UTC, Tareq Alayan
no flags Details
db-dump (2.41 MB, application/octet-stream)
2017-07-12 08:31 UTC, Tareq Alayan
no flags Details

Description Tareq Alayan 2017-07-12 07:49:25 UTC
Description of problem:
fail to run engine-setup 

Version-Release number of selected component (if applicable):
rhevm-3.6.11.3-0.1.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. i have rhevm-3.6.11.3-0.1.el6.noarch 
2. added repos for 3.6.12 (there is no updates for engine)
3. ran engine-setup 

Actual results:
[ ERROR ] Failed to execute stage 'Misc configuration': Command '/usr/share/ovirt-engine/dbscripts/schema.sh' failed to execute

snipet from log:
2017-07-12 10:05:11 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema plugin.execute:941 execute-output: ['/usr/share/ovirt-engine/dbscripts/schema.sh', '-s', 'localhost', '-p', '5432', '-u', 'engine
', '-d', 'engine', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20170712100438-qske9v.log', '-c', 'apply'] stderr:
psql:/usr/share/ovirt-engine/dbscripts/upgrade/post_upgrade/0030_set_default_cluster_for_registration.sql:19: ERROR:  null value in column "option_value" violates not-null constraint
CONTEXT:  SQL statement "update vdc_options set option_value = (select vds_group_id from vds_groups LIMIT 1) where option_name = 'AutoRegistrationDefaultVdsGroupID' and version = 'general'"
PL/pgSQL function "__temp_set_default_cluster_for_registration" line 9 at SQL statement
FATAL: Cannot execute sql command: --file=/usr/share/ovirt-engine/dbscripts/upgrade/post_upgrade/0030_set_default_cluster_for_registration.sql

2017-07-12 10:05:11 DEBUG otopi.context context._executeMethod:156 method exception
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/otopi/context.py", line 146, in _executeMethod
    method['method']()
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/db/schema.py", line 291, in _misc
    oenginecons.EngineDBEnv.PGPASS_FILE
  File "/usr/lib/python2.6/site-packages/otopi/plugin.py", line 946, in execute
    command=args[0],
RuntimeError: Command '/usr/share/ovirt-engine/dbscripts/schema.sh' failed to execute
2017-07-12 10:05:11 ERROR otopi.context context._executeMethod:165 Failed to execute stage 'Misc configuration': Command '/usr/share/ovirt-engine/dbscripts/schema.sh' failed to execute
2017-07-12 10:05:11 DEBUG otopi.transaction transaction.abort:134 aborting 'Yum Transaction'
2017-07-12 10:05:11 INFO otopi.plugins.otopi.packagers.yumpackager yumpackager.info:95 Yum Performing yum transaction rollback
Loaded plugins: product-id, versionlock

Expected results:
run with no errors even that there is no updates for engine 

Additional info:

Comment 1 Tareq Alayan 2017-07-12 07:50:44 UTC
Created attachment 1296771 [details]
engine-setup-log

Comment 2 Tareq Alayan 2017-07-12 08:31:39 UTC
Created attachment 1296779 [details]
db-dump

Comment 3 Martin Perina 2017-07-12 08:50:26 UTC
The issue is happening if you don't have any cluster in your system, which means you don't have any hosts/VMs in your setup. If that's the case why would you want to upgrade such setup?

I'm closing as WONTFIX as I think it's not worth to fix this case (it is highly unlikely to happen in production)


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