Bug 1475751

Summary: migration/RDMA: backport fixes
Product: Red Hat Enterprise Linux 7 Reporter: Dr. David Alan Gilbert <dgilbert>
Component: qemu-kvmAssignee: Dr. David Alan Gilbert <dgilbert>
Status: CLOSED ERRATA QA Contact: xianwang <xianwang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4-AltCC: chayang, dgilbert, hannsj_uhl, huding, jen, juzhang, knoel, michen, pezhang, qzhang, rbalakri, virt-maint, xfu, xianwang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-2.9.0-19.el7a Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1285044 Environment:
Last Closed: 2017-11-09 11:31:17 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: 1285044, 1457423    
Bug Blocks:    

Comment 2 Dr. David Alan Gilbert 2017-07-27 12:10:40 UTC
Posted downstream.

Note, the easiest case to test that this fixes is:
   a) Start qemu on destination
   b) Start qemu on source
   c) Start migration (migrate -d)
   d) Kill qemu on destination before migration finishes
   e) do  migrate_cancel on source
   f) Use   'info migrate' to check the source isn't stuck in cancelling.

You have to be pretty fast to do (d) unless you give the guest lots of RAM.

Comment 3 Miroslav Rezanina 2017-08-01 13:34:47 UTC
Fix included in qemu-kvm-2.9.0-19.el7a

Comment 5 Qunfang Zhang 2017-09-08 08:11:40 UTC
Currently we are still waiting for the second DD2 hardware to test migration, and confirming with IBM when the second DD2 hardware is available for QE.

Comment 6 xianwang 2017-09-19 08:09:18 UTC
 (In reply to Dr. David Alan Gilbert from comment #2)
> Posted downstream.
> 
> Note, the easiest case to test that this fixes is:
>    a) Start qemu on destination
>    b) Start qemu on source
>    c) Start migration (migrate -d)
>    d) Kill qemu on destination before migration finishes
>    e) do  migrate_cancel on source
>    f) Use   'info migrate' to check the source isn't stuck in cancelling.
> 
> You have to be pretty fast to do (d) unless you give the guest lots of RAM.

I have test this scenario on P9 DD2, the result of step f) is "Migration status: cancelled", but once I "migrate_cancel" in src host, there will be "(qemu) qemu-kvm: Early error. Sending error." prompt in src HMP, the vm works well, I am not sure whether it is expected result.

version:
host:
4.11.0-33.el7a.ppc64le
qemu-kvm-2.9.0-22.el7a.ppc64le
SLOF-20170303-4.git66d250e.el7.noarch

guest:
4.11.0-33.el7a.ppc64le

scenario I:
step:
 Start qemu on destination
    b) Start qemu on source
    c) Start migration (migrate -d)
    d) Kill qemu on destination before migration finishes
    e) do  migrate_cancel on source
    f) Use   'info migrate' to check the source isn't stuck in cancelling.
result:
src:
(qemu) migrate_cancel 
(qemu) qemu-kvm: rdma migration: recv polling control error!
qemu-kvm: RDMA is in an error state waiting migration to abort!
qemu-kvm: Early error. Sending error.
qemu-kvm: rdma migration: send polling control error
(qemu) info migrate
capabilities: xbzrle: off rdma-pin-all: on auto-converge: off zero-blocks: off compress: off events: off postcopy-ram: off x-colo: off release-ram: off 
Migration status: cancelled
total time: 0 milliseconds
(qemu) info status 
VM status: running

vm works well in src host.

scenario II:
step:
 Start qemu on destination
    b) Start qemu on source
    c) Start migration (migrate -d)
    d) do  migrate_cancel on source
    e) Use   'info migrate' to check the source isn't stuck in cancelling.
result:
(qemu) migrate_cancel 
(qemu) qemu-kvm: Early error. Sending error.
(qemu) info migrate
capabilities: xbzrle: off rdma-pin-all: on auto-converge: off zero-blocks: off compress: off events: off postcopy-ram: off x-colo: off release-ram: off 
Migration status: cancelled
total time: 0 milliseconds
(qemu) info status 
VM status: running

vm works well in src host.

Comment 7 Dr. David Alan Gilbert 2017-09-19 08:31:16 UTC
Yes, that's fine - the important thing is that the source carries on working and the monitor on the source responds to commands (such as the info).

Comment 8 xianwang 2017-09-19 10:38:52 UTC
ok, referring to comment2,6,7,this bug is fixed.

Comment 10 errata-xmlrpc 2017-11-09 11:31:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:3169