Bug 1871792 - Importing VM using virt-v2v fails if service ovirt-engine restarted during AddDisk operation.
Summary: Importing VM using virt-v2v fails if service ovirt-engine restarted during Ad...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.3.10
Hardware: x86_64
OS: Unspecified
unspecified
low
Target Milestone: ovirt-4.4.4
: 4.4.4
Assignee: Liran Rotenberg
QA Contact: Nisim Simsolo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-24 10:21 UTC by Ameya Charekar
Modified: 2023-12-15 18:59 UTC (History)
8 users (show)

Fixed In Version: ovirt-engine-4.4.4
Doc Type: Bug Fix
Doc Text:
Previously, when importing a Virtual Machine using virt-v2v and the ovirt-engine service restarted, the import failed. In this release, the import continues as long there is an async command running, allowing the import to complete successfully.
Clone Of:
Environment:
Last Closed: 2020-11-13 16:01:37 UTC
oVirt Team: Virt
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 5343271 0 None None None 2020-08-24 10:58:53 UTC
oVirt gerrit 111356 0 master MERGED core: prevent a failure of command by compesnation 2021-02-14 13:17:46 UTC

Description Ameya Charekar 2020-08-24 10:21:36 UTC
Description of problem:
Importing VM using virt-v2v fails if service ovirt-engine restarted during AddDisk operation as compensation runs for the command, deleting a few things that were created, including vm_static resulting in failure of virt-v2v operation.

Version-Release number of selected component (if applicable):
virt-v2v-1.40.2-9.el7.x86_64
rhvm-4.3.10.4-0.1.el7.noarch

How reproducible:
Always

Steps to Reproduce:
1. Import VM using virt-v2v.
2. Restart service during AddDisk operation
3.

Actual results:
VM import fails with error:-
~~~
Command 'org.ovirt.engine.core.bll.exportimport.UpdateConvertedVmCommand' failed: CallableStatementCallback; SQL [{call insertvmdevice(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}ERROR: insert or update on table "vm_device" violates foreign key constraint "fk_vm_device_vm_static"
~~~

Expected results:
Operation should succeed without any errors.

Additional info:
The VM import is successful on host and no issues are reported in import logs.

Comment 2 Michal Skrivanek 2020-08-25 04:07:54 UTC
If you restart during import, why is it surprising that it fails? Does it have any ill side effects or it can be just re-imported?

Comment 3 Germano Veit Michel 2020-08-25 04:15:07 UTC
Michal, it's not terribly bad, but I think the ask here is for compensation on engine-restart to not mess up the import. This is all async anyway and may take several hours to run. 
Perhaps it should survive a restart like some other operations do. Don't think there were side effects besides the obvious failure.

Comment 5 Arik 2020-08-25 10:10:42 UTC
Shouldn't we skip compensation on startup for commands set are set with compensationPhase = CommandCompensationPhase.END_COMMAND ?

Comment 14 Casper (RHV QE bot) 2020-11-13 16:01:37 UTC
This bug has a low overall severity and passed automated regreession suite, it is not going to be further verified by QE. If you believe a special care is required feel free to re-open to ON_QA status

Comment 19 meital avital 2022-05-19 15:39:12 UTC
Due to QE capacity we are not going to cover this issue in our automation


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