Bug 1275747

Summary: Cancel migration VDSErrorException Failed to DestroyVDS on destination host
Product: [oVirt] ovirt-engine Reporter: Israel Pinto <ipinto>
Component: BLL.VirtAssignee: Marek Libra <mlibra>
Status: CLOSED CURRENTRELEASE QA Contact: Israel Pinto <ipinto>
Severity: low Docs Contact:
Priority: medium    
Version: 3.6.0CC: ahadas, bugs, mavital, michal.skrivanek, tjelinek
Target Milestone: ovirt-4.0.0-alphaFlags: rule-engine: ovirt-4.0.0+
ipinto: testing_plan_complete?
rule-engine: planning_ack+
michal.skrivanek: devel_ack+
mavital: testing_ack+
Target Release: 4.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt 4.0.0 alpha1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-01 12:29:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine_log
none
hosts_logs none

Description Israel Pinto 2015-10-27 15:53:53 UTC
Description of problem:
VDS error on engine after cancel migration done and success.
from audit log:
"VDSM host_mixed_2 command failed: Virtual machine does not exist"

Version-Release number of selected component (if applicable):
RHEVM:rhevm-3.6.0.1-0.1.el6.noarch
VDSM: vdsm-4.17.9-1.el7ev.noarch
libvirt: libvirt-1.2.17-12.el7.x86_64)

Steps to Reproduce:
1. Migrate VM
2. After few seconds cancel migration


Actual results:
Cancel migration done and success, but VDS error happened after cancel migration finished

Expected results:
No error after cancel done

Additional info:
From engine log:
2015-10-22 13:43:11,890 INFO  [org.ovirt.engine.core.bll.CancelMigrateVmCommand] (ajp-/127.0.0.1:8702-4) [vms_syncAction_aee3aaec-d263-47f7] Running command: CancelMigrateVmCommand internal: false. Entities affected :  ID: 64eb2c5e-aaf7-49ef-b1bc-df846ffcb7ca Type: VMAction group MIGRATE_VM with role type USER
2015-10-22 13:43:11,891 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand] (ajp-/127.0.0.1:8702-4) [vms_syncAction_aee3aaec-d263-47f7] START, CancelMigrateVDSCommand(HostName = host_mixed_2, CancelMigrationVDSParameters:{runAsync='true', hostId='b076984b-bf25-450e-b8e5-48192757ead5', vmId='64eb2c5e-aaf7-49ef-b1bc-df846ffcb7ca'}), log id: 5de7eb8f
2015-10-22 13:43:11,916 INFO  [org.ovirt.engine.core.bll.MigrateVmCommand] (ajp-/127.0.0.1:8702-4) [vms_syncAction_aee3aaec-d263-47f7] Lock freed to object 'EngineLock:{exclusiveLocks='[64eb2c5e-aaf7-49ef-b1bc-df846ffcb7ca=<VM, ACTION_TYPE_FAILED_VM_IS_BEING_MIGRATED$VmName golden_env_mixed_virtio_1>]', sharedLocks='null'}'
2015-10-22 13:43:11,916 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand] (ajp-/127.0.0.1:8702-4) [vms_syncAction_aee3aaec-d263-47f7] FINISH, CancelMigrateVDSCommand, log id: 5de7eb8f
2015-10-22 13:43:11,923 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ajp-/127.0.0.1:8702-4) [vms_syncAction_aee3aaec-d263-47f7] Correlation ID: vms_syncAction_aee3aaec-d263-47f7, Call Stack: null, Custom Event ID: -1, Message: Migration cancelled (VM: golden_env_mixed_virtio_1, Source: host_mixed_2, User: admin@internal).
2015-10-22 13:43:12,214 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand] (ForkJoinPool-1-worker-390) [4b08e94f] START, DestroyVDSCommand(HostName = host_mixed_1, DestroyVmVDSCommandParameters:{runAsync='true', hostId='c84dd08c-a044-4159-a2bf-32c0c615001c', vmId='64eb2c5e-aaf7-49ef-b1bc-df846ffcb7ca', force='false', secondsToWait='0', gracefully='false', reason=''}), log id: 2f32475b
2015-10-22 13:43:12,220 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand] (ForkJoinPool-1-worker-390) [4b08e94f] Failed in 'DestroyVDS' method
2015-10-22 13:43:12,225 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ForkJoinPool-1-worker-390) [4b08e94f] Correlation ID: null, Call Stack: null, Custom Event ID: -1, Message: VDSM host_mixed_1 command failed: Virtual machine does not exist
2015-10-22 13:43:12,225 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand] (ForkJoinPool-1-worker-390) [4b08e94f] Command 'org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand' return value 'StatusOnlyReturnForXmlRpc [status=StatusForXmlRpc [code=1, message=Virtual machine does not exist]]'
2015-10-22 13:43:12,225 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand] (ForkJoinPool-1-worker-390) [4b08e94f] HostName = host_mixed_1
2015-10-22 13:43:12,225 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand] (ForkJoinPool-1-worker-390) [4b08e94f] Command 'DestroyVDSCommand(HostName = host_mixed_1, DestroyVmVDSCommandParameters:{runAsync='true', hostId='c84dd08c-a044-4159-a2bf-32c0c615001c', vmId='64eb2c5e-aaf7-49ef-b1bc-df846ffcb7ca', force='false', secondsToWait='0', gracefully='false', reason=''})' execution failed: VDSGenericException: VDSErrorException: Failed to DestroyVDS, error = Virtual machine does not exist, code = 1
2015-10-22 13:43:12,225 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand] (ForkJoinPool-1-worker-390) [4b08e94f] FINISH, DestroyVDSCommand, log id: 2f32475b
2015-10-22 13:43:12,227 INFO  [org.ovirt.engine.core.vdsbroker.VmAnalyzer] (ForkJoinPool-1-worker-390) [4b08e94f] RefreshVmList VM id '64eb2c5e-aaf7-49ef-b1bc-df846ffcb7ca' status = 'Down' on VDS 'host_mixed_1' ignoring it in the refresh until migration is done

Comment 1 Israel Pinto 2015-10-27 15:54:31 UTC
Created attachment 1086909 [details]
engine_log

Comment 2 Israel Pinto 2015-10-27 15:55:56 UTC
Created attachment 1086910 [details]
hosts_logs

Comment 3 Michal Skrivanek 2015-11-04 14:34:59 UTC
It's harmless, but we can surely swallow the error.

Comment 4 Red Hat Bugzilla Rules Engine 2015-11-23 10:00:41 UTC
Fixed bug tickets must have version flags set prior to fixing them. Please set the correct version flags and move the bugs back to the previous status after this is corrected.

Comment 5 Israel Pinto 2016-07-21 11:22:54 UTC
Verify with:
Red Hat Virtualization Manager Version: 4.0.2-0.2.rc1.el7ev
Hosts:
OS Version:RHEL - 7.2 - 9.el7_2.1
Kernel Version:3.10.0 - 327.22.2.el7.x86_64
KVM Version:2.3.0 - 31.el7_2.16
LIBVIRT Version:libvirt-1.2.17-13.el7_2.5
VDSM Version:vdsm-4.18.5.1-1.el7ev
SPICE Version:0.12.4 - 15.el7_2.1 

Steps:
1. Migrate VM
2. Cancel migration (from GUI and with Automation)
3. Check logs for the error message.

Results:
No Error massages found