Bug 1611673 - Upgrade to 4.2.5 fails with "RuntimeError: Engine schema refresh failed"
Summary: Upgrade to 4.2.5 fails with "RuntimeError: Engine schema refresh failed"
Keywords:
Status: CLOSED DUPLICATE of bug 1609839
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Database.Core
Version: 4.2.5
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ovirt-4.2.6
: ---
Assignee: Daniel Erez
QA Contact: Elad
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-02 15:26 UTC by Raz Tamir
Modified: 2018-08-03 08:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-03 08:25:27 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.2+
rule-engine: blocker+


Attachments (Terms of Use)

Description Raz Tamir 2018-08-02 15:26:45 UTC
Description of problem:

When upgrading to 4.2.5, the operation fails with:
snippet from upgrade log:

Running upgrade sql script '/usr/share/ovirt-engine/dbscripts/upgrade/04_02_1210_add_foreign_key_to_image_transfers.sql'...

2018-08-02 09:14:33,116+0200 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema plugin.execute:926 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-20180802091038-xclfnu.log', '-c', 'apply'] stderr:
psql:/usr/share/ovirt-engine/dbscripts/upgrade/04_02_1210_add_foreign_key_to_image_transfers.sql:1: ERROR:  insert or update on table "image_transfers" violates foreign key constraint "fk_image_transfers_command
_enitites"
DETAIL:  Key (command_id)=(312f711f-a5c3-477d-8533-82ef88a54b77) is not present in table "command_entities".
FATAL: Cannot execute sql command: --file=/usr/share/ovirt-engine/dbscripts/upgrade/04_02_1210_add_foreign_key_to_image_transfers.sql

2018-08-02 09:14:33,117+0200 ERROR otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema schema._misc:434 schema.sh: FATAL: Cannot execute sql command: --file=/usr/share/ovirt-engine/dbscripts/upgrade/04_02_12
10_add_foreign_key_to_image_transfers.sql
2018-08-02 09:14:33,119+0200 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/schema.py", line 436, in _misc
    raise RuntimeError(_('Engine schema refresh failed'))
RuntimeError: Engine schema refresh failed
2018-08-02 09:14:33,122+0200 ERROR otopi.context context._executeMethod:152 Failed to execute stage 'Misc configuration': Engine schema refresh failed

* I don't have the full log


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


How reproducible:
Don't know - observed twich on 2 different environments

Steps to Reproduce:
1. Upgrade to 4.2.5
2.
3.

Actual results:


Expected results:


Additional info:
This seems to be related to the fix of this bug - https://bugzilla.redhat.com/show_bug.cgi?id=1586126

Comment 1 Michal Skrivanek 2018-08-03 08:15:26 UTC
duplicate of bug 1609839?

Comment 2 Daniel Erez 2018-08-03 08:25:27 UTC
(In reply to Michal Skrivanek from comment #1)
> duplicate of bug 1609839?

Indeed same issue, I'll close this one.

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


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