Hi Edward,

On 4/16/19 9:23 PM, Edward Berger wrote:
I was trying to upgrade a hyperconverged oVirt hosted engine and failed in the engine-setup command with these error and warnings.

[ INFO  ] Creating/refreshing Engine database schema
[ ERROR ] schema.sh: FATAL: Cannot execute sql command: --file=/usr/share/ovirt-engine/dbscripts/upgrade/04_03_0830_add_foreign_key_to_image_transfers.sql
The error is

ERROR:  insert or update on table "image_transfers" violates foreign key constraint "fk_image_transfers_command_enitites"
DETAIL:  Key (command_id)=(fedc82f7-9bf7-4988-b9d9-23853e04e44e) is not present in table "command_entities".

So there is some image transfer left without appropriate command entity.
If you are sure that no such transfer is active. You can remove it from the table.

$ scl enable rh-postgresql10 bash
$ psql engine

engine=# delete from image_transfers where command_id='fedc82f7-9bf7-4988-b9d9-23853e04e44e';

[ ERROR ] Failed to execute stage 'Misc configuration': Engine schema refresh failed
[ INFO  ] Yum Verify: 16/16: ovirt-engine-tools.noarch 0: - e
[WARNING] Rollback of DWH database postponed to Stage "Clean up"
[ INFO  ] Rolling back database schema
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ ERROR ] Execution of setup failed

Attaching engine-setup logfile.

Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-leave@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/
List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/45EDYLIQE4QUJYZUG6KJJRJAKCJ5OI3P/
Best regards,
Lucie Leistnerova
Quality Engineer, QE Cloud, RHVM
Red Hat EMEA

IRC: lleistne @ #rhev-qe