Hi,

We have a failure in CQ on ovirt-master for test 001_upgrade_engine.test_initialize_engine on upgrade suite.

Link and headline of suspected patches:

https://gerrit.ovirt.org/#/c/93466/ - core: clean stale image_transfer on upgrade


Link to Job:

https://jenkins.ovirt.org/job/ovirt-master_change-queue-tester/8975

Link to all logs:

https://jenkins.ovirt.org/job/ovirt-master_change-queue-tester/8975/artifact/upgrade-from-release-suite.el7.x86_64/test_logs/upgrade-from-release-suite-master/post-001_upgrade_engine.py/

(Relevant) error snippet from the log:

<error>



[ INFO  ] Stage: Misc configuration
[ INFO  ] Upgrading CA
[ INFO  ] Backing up database localhost:ovirt_engine_history to '/var/lib/ovirt-engine-dwh/backups/dwh-20180806074534.L73Aa6.dump'.
[ INFO  ] Creating/refreshing DWH database schema
[ INFO  ] Configuring WebSocket Proxy
[ INFO  ] Backing up database localhost:engine to '/var/lib/ovirt-engine/backups/engine-20180806074537.V9dDgr.dump'.
[ INFO  ] Creating/refreshing Engine database schema
[ ERROR ] schema.sh: FATAL: Cannot execute sql command: --file=/usr/share/ovirt-engine/dbscripts/upgrade/04_03_0270_add_foreign_key_to_image_transfers.sql
[ ERROR ] Failed to execute stage 'Misc configuration': Engine schema refresh failed
[WARNING] Rollback of DWH database postponed to Stage "Clean up"
[ INFO  ] Rolling back database schema
[ INFO  ] Clearing Engine database engine
[ INFO  ] Restoring Engine database engine
[ INFO  ] Restoring file '/var/lib/ovirt-engine/backups/engine-20180806074537.V9dDgr.dump' to database localhost:engine.
[ ERROR ] Errors while restoring engine database, please check the log file for details
[ INFO  ] Stage: Clean up
          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20180806074515-jb06pl.log
[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20180806074550-setup.conf'
[WARNING] Rollback of DWH database started
          This might be a long process, but it should be safe to start the engine service before it finishes, if needed.
[ INFO  ] Clearing DWH database ovirt_engine_history
[ INFO  ] Restoring DWH database ovirt_engine_history
[ INFO  ] Restoring file '/var/lib/ovirt-engine-dwh/backups/dwh-20180806074534.L73Aa6.dump' to database localhost:ovirt_engine_history.
[ ERROR ] Errors while restoring ovirt_engine_history database, please check the log file for details
[ INFO  ] Stage: Pre-termination

</error>