Bug 1160997

Summary: RDMA based live guest migration failed if using --rdma-pin-all
Product: Red Hat Enterprise Linux 7 Reporter: zhe peng <zpeng>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: dyuan, honzhang, jmiao, mzhan, rbalakri, zhwang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-10 16:05:03 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:
Description Flags
source qemu log
souce libvirtd log
target qemu log none

Description zhe peng 2014-11-06 05:45:23 UTC
Description of problem:
RDMA based live guest migration failed with --rdma-pin-all option.

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

How reproducible:

Steps to Reproduce:
1.prepare rdma based migration env.
2.config rdma support in qemu.conf & libvirtd.conf
3.load module.
4.do migration with --rdma-pin-all option.

# virsh migrate --live --rdma-pin-all --migrateuri rdma:// rhel7 --listen-address 0 qemu+ssh:// --verbose 
error: operation failed: migration job: unexpectedly failed

Actual results:
got error,in /var/log/libvirt/qemu/$guest.xml

source_resolve_host RDMA Device opened: kernel name mlx4_0 uverbs device name uverbs0, infiniband_verbs class device path /sys/class/infiniband_verbs/uverbs0, infiniband class device path /sys/class/infiniband/mlx4_0, transport: (2) Ethernet
Failed to register local dest ram block!
: Cannot allocate memory
RDMA ERROR: receiving remote info!

Expected results:
work well.

Additional info:

Comment 1 zhe peng 2014-11-06 05:47:36 UTC
Created attachment 954317 [details]
source qemu log

Comment 2 zhe peng 2014-11-06 05:48:14 UTC
Created attachment 954318 [details]
souce libvirtd log

Comment 3 zhe peng 2014-11-06 05:48:57 UTC
Created attachment 954319 [details]
target qemu log

Comment 5 Jiri Denemark 2014-11-10 16:05:03 UTC
The relevant part of domain XML is:

  <memory unit='KiB'>1048576</memory>
    <hard_limit unit='KiB'>1048576</hard_limit>

The hard limit is just too low, remember that both guest memory and any memory consumed by QEMU itself has to fit within the limit, otherwise the domain will be killed sooner or later even without any migration or rdma-pin-all.

Comment 6 Jiri Denemark 2014-11-10 16:08:01 UTC
Oops, I didn't really want to change the summary...

Comment 7 zhe peng 2014-11-11 03:19:53 UTC
Got it , thanks.
I update xml to:
    <hard_limit unit='KiB'>2097152</hard_limit>
    <swap_hard_limit unit='KiB'>2097152</swap_hard_limit>

then do migration:
# virsh migrate --live --rdma-pin-all --migrateuri rdma:// rhel7 --listen-address 0 qemu+ssh:// --verbose 
Migration: [100 %]

migration worked well with --rdma-pin-all, thanks your explain.