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.
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?
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.
Shouldn't we skip compensation on startup for commands set are set with compensationPhase = CommandCompensationPhase.END_COMMAND ?
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
Due to QE capacity we are not going to cover this issue in our automation