Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1149470

Summary: Can't cancel ongoing migration for guest-image of 7.0, while migration being cancelled from RHEL7.0 host to RHEL6.6 host.
Product: Red Hat Enterprise Virtualization Manager Reporter: Nikolai Sednev <nsednev>
Component: ovirt-engineAssignee: Nobody <nobody>
Status: CLOSED WORKSFORME QA Contact: Nikolai Sednev <nsednev>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.5.0CC: ecohen, gklein, iheim, lpeer, lsurette, mavital, michal.skrivanek, nsednev, ofrenkel, rbalakri, Rhev-m-bugs, yeylon
Target Milestone: ---Keywords: Triaged
Target Release: 3.5.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-30 07:18:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1154769    
Bug Blocks:    
Attachments:
Description Flags
logs none

Description Nikolai Sednev 2014-10-05 11:33:38 UTC
Created attachment 944016 [details]
logs

Description of problem:
Can't cancel ongoing migration for guest-image of 7.0, while migration being cancelled from RHEL7.0 host to RHEL6.6 host.
VM created on RHEL7.0 host from template received via export domain (rhel-guest-image-7.0-20140930.0.x86_64).

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.Upload to export domain the rhel-guest-image-7.0-20140930.0.x86_64.
2.Import template.
3.Create VM from template over RHEL7.0 host.
4.Disable selinux on RHEL6.6.
5.Start VM on RHEL7.0 host.
6.Migrate VM from RHEL7.0 host to RHEL 6.6.
7.Cancel migration from RHEl7.0 ton RHEL6.6.

Actual results:
	
2014-Oct-05, 14:08
	
Failed to cancel migration for VM: 930RHEL7

Expected results:
Cancellation should succeed.

Additional info:
logs

Comment 1 Omer Frenkel 2014-10-06 07:55:07 UTC
from the logs it looks like you tried to cancel twice, the first succeed and the second fails because its already cancelled:

first cancel executed:
2014-10-05 13:15:41,255 INFO  [org.ovirt.engine.core.bll.CancelMigrateVmCommand] (org.ovirt.thread.pool-7-thread-41) [698b2ec7] Running command: CancelMigrateVmCommand internal: false. Entities affected :  ID: dcc963c3-6d29-4380-8fdd-1a77ebbf92f8 Type: VMAction group MIGRATE_VM with role type USER
2014-10-05 13:15:41,262 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand] (org.ovirt.thread.pool-7-thread-41) [698b2ec7] START, CancelMigrateVDSCommand(HostName = black-vdsb.qa.lab.tlv.redhat.com, HostId = 97346696-9211-4ddb-8f24-14bb70d5b863, vmId=dcc963c3-6d29-4380-8fdd-1a77ebbf92f8), log id: 2dfc28ca
2014-10-05 13:15:41,296 INFO  [org.ovirt.engine.core.bll.MigrateVmCommand] (org.ovirt.thread.pool-7-thread-41) [698b2ec7] Lock freed to object EngineLock [exclusiveLocks= key: dcc963c3-6d29-4380-8fdd-1a77ebbf92f8 value: VM
, sharedLocks= ]
2014-10-05 13:15:41,296 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand] (org.ovirt.thread.pool-7-thread-41) [698b2ec7] FINISH, CancelMigrateVDSCommand, log id: 2dfc28ca


and succeeds:
2014-10-05 13:15:41,332 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-7-thread-41) [698b2ec7] Correlation ID: 698b2ec7, Call Stack: null, Custom Event ID: -1, Message: Migration cancelled (VM: 930RHEL7, Source: black-vdsb.qa.lab.tlv.redhat.com, User: admin).


then the second cancel is sent:
2014-10-05 13:15:43,297 INFO  [org.ovirt.engine.core.bll.CancelMigrateVmCommand] (org.ovirt.thread.pool-7-thread-14) [5ee043ac] Running command: CancelMigrateVmCommand internal: false. Entities affected :  ID: dcc963c3-6d29-4380-8fdd-1a77ebbf92f8 Type: VMAction group MIGRATE_VM with role type USER
2014-10-05 13:15:43,299 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand] (org.ovirt.thread.pool-7-thread-14) [5ee043ac] START, CancelMigrateVDSCommand(HostName = black-vdsb.qa.lab.tlv.redhat.com, HostId = 97346696-9211-4ddb-8f24-14bb70d5b863, vmId=dcc963c3-6d29-4380-8fdd-1a77ebbf92f8), log id: 60f7bd2a


and fails because migration is already cancelled:
2014-10-05 13:15:43,307 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand] (org.ovirt.thread.pool-7-thread-14) [5ee043ac] Failed in CancelMigrateVDS method
2014-10-05 13:15:43,307 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand] (org.ovirt.thread.pool-7-thread-14) [5ee043ac] Command org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand return value 
 StatusOnlyReturnForXmlRpc [mStatus=StatusForXmlRpc [mCode=47, mMessage=Migration process cancelled]]


can you please re-check this scenario and make sure to try only once?

Comment 2 Nikolai Sednev 2014-10-06 08:42:43 UTC
I did it once.

Comment 3 Omer Frenkel 2014-10-06 08:50:58 UTC
not according to the log, maybe by mistake.
please re-test

Comment 4 Michal Skrivanek 2014-10-22 16:48:47 UTC
it's an invalid flow which is going to be blocked by bug 1154631

Do you want to try the 6.6->6.6 or 7.0-->7.0 scenario here? Then the bug can remain open, otherwise please close

Comment 5 Nikolai Sednev 2014-10-22 17:21:10 UTC
(In reply to Michal Skrivanek from comment #4)
> it's an invalid flow which is going to be blocked by bug 1154631
> 
> Do you want to try the 6.6->6.6 or 7.0-->7.0 scenario here? Then the bug can
> remain open, otherwise please close

6.6<->6.6 worked for me with severe problems on HE environment (https://bugzilla.redhat.com/show_bug.cgi?id=1155705), 7.0<->7.0 not tested as blocked by another issue there with 7.0 deployment on to (https://bugzilla.redhat.com/show_bug.cgi?id=1154769) to HE environment.

Comment 6 Omer Frenkel 2014-10-29 15:26:27 UTC
Nikolai, setting need-info again on you to test once its possible and update this bug with what you discover, thanks.

Comment 7 Nikolai Sednev 2014-10-30 07:10:02 UTC
Cancellation of migration from 7.0->6.6 worked for me on components as bellow:
libvirt-daemon-1.1.1-29.el7_0.3.x86_64
libvirt-daemon-driver-storage-1.1.1-29.el7_0.3.x86_64
libvirt-daemon-driver-nodedev-1.1.1-29.el7_0.3.x86_64
libvirt-daemon-driver-network-1.1.1-29.el7_0.3.x86_64
qemu-kvm-rhev-1.5.3-60.el7_0.10.x86_64
libvirt-client-1.1.1-29.el7_0.3.x86_64
libvirt-daemon-driver-nwfilter-1.1.1-29.el7_0.3.x86_64
libvirt-daemon-driver-interface-1.1.1-29.el7_0.3.x86_64
libvirt-lock-sanlock-1.1.1-29.el7_0.3.x86_64
libvirt-daemon-config-nwfilter-1.1.1-29.el7_0.3.x86_64
libvirt-daemon-driver-qemu-1.1.1-29.el7_0.3.x86_64
libvirt-daemon-kvm-1.1.1-29.el7_0.3.x86_64
vdsm-4.16.7.2-1.el7.x86_64
libvirt-python-1.1.1-29.el7_0.3.x86_64
libvirt-daemon-driver-secret-1.1.1-29.el7_0.3.x86_64
sanlock-3.1.0-2.el7.x86_64


Regarding migration itself, it worked for me 6.6<->6.6; 7.0<->7.0, but 7.0->6.6 failed: VM finished it's migration and became not accessible, although shown as UP and active.

As for this bug I think it may be closed as root scenario not reproduced and 7.0->6.5/6.6 should be inhibited following 1154631.

Comment 8 Omer Frenkel 2014-10-30 07:18:25 UTC
Thanks!
closing, please re-open if you see this again.

Comment 9 Nikolai Sednev 2014-10-30 07:29:58 UTC
These components were used on RHEL6.6's:
ovirt-hosted-engine-setup-1.2.1-1.el6ev.noarch
libvirt-0.10.2-46.el6_6.1.x86_64
ovirt-hosted-engine-ha-1.2.4-1.el6ev.noarch
vdsm-4.16.7.1-1.el6ev.x86_64
sanlock-2.8-1.el6.x86_64
ovirt-host-deploy-1.3.0-1.el6ev.noarch

These on HE's RHEVM:
rhevm-3.5.0-0.18.beta.el6ev.noarch