Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1495474 - Fail to quit source qemu when do live migration after mirroring guest to NBD server [rhel-7.4.z]
Fail to quit source qemu when do live migration after mirroring guest to NBD ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.4
x86_64 Linux
high Severity high
: rc
: ---
Assigned To: Eric Blake
Longxiang Lyu
: Regression, ZStream
Depends On: 1482478
Blocks:
  Show dependency treegraph
 
Reported: 2017-09-26 03:00 EDT by Oneata Mircea Teodor
Modified: 2018-06-29 07:28 EDT (History)
18 users (show)

See Also:
Fixed In Version: qemu-kvm-rhev-2.9.0-16.el7_4.9
Doc Type: Bug Fix
Doc Text:
Improvements made for qemu 2.9 to the NBD code used during live storage migration were not robust to an abrupt exit of the other end of the connection; the result was that live migration could fail if the source side NBD connection failed. The NBD code has been fixed to be more robust regardless of what the other side of the connection does.
Story Points: ---
Clone Of: 1482478
Environment:
Last Closed: 2017-11-30 15:34:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3369 normal SHIPPED_LIVE Moderate: qemu-kvm-rhev security and bug fix update 2017-11-30 20:33:08 EST

  None (edit)
Description Oneata Mircea Teodor 2017-09-26 03:00:19 EDT
This bug has been copied from bug #1482478 and has been proposed to be backported to 7.4 z-stream (EUS).
Comment 5 Miroslav Rezanina 2017-10-09 06:28:25 EDT
Fix included in qemu-kvm-rhev-2.9.0-16.el7_4.9
Comment 6 Longxiang Lyu 2017-10-09 22:23:46 EDT
Bug is verified pass for qemu-kvm-rhev-2.9.0-16.el7_4.9

Steps for verification:
1. boot guest on src
#!/bin/bash
/usr/libexec/qemu-kvm \
-name guest=test-virt \
-machine pc,usb=off,vmport=off,dump-guest-core=off \
-cpu SandyBridge \
-m 2G \
-smp 4,sockets=4,cores=1,threads=1 \
-boot strict=on \
-drive file=/home/test/nbd01/test.qcow2,if=none,cache=none,snapshot=off,format=qcow2,id=img0 \
-device virtio-blk-pci,bus=pci.0,addr=0x7,drive=img0,id=virtio-disk0,bootindex=1 \
-netdev tap,id=hostnet0,vhost=on \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:12:b3:20:61,bus=pci.0,addr=0x3 \
-device VGA \
-usbdevice tablet \
-vnc :1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 \
-monitor stdio \
-qmp tcp:0:4444,server,nowait

2. create dest mirror image 
# qemu-img create -f qcow2 mirror1.qcow2 20G

3. start dest guest and setup as NBD server
#!/bin/bash
/usr/libexec/qemu-kvm \
-name guest=test-virt \
-machine pc,accel=kvm,usb=off,vmport=off,dump-guest-core=off \
-cpu SandyBridge \
-m 2G \
-smp 4,sockets=4,cores=1,threads=1 \
-boot strict=on \
-drive file=/home/test/nbd01/mirror1.qcow2,if=none,cache=none,snapshot=off,format=qcow2,id=img0 \
-device virtio-blk-pci,bus=pci.0,addr=0x7,drive=img0,id=virtio-disk0,bootindex=1 \
-netdev tap,id=hostnet0,vhost=on \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:12:b3:20:61,bus=pci.0,addr=0x3 \
-device VGA \
-usbdevice tablet \
-vnc :3 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 \
-monitor stdio \
-qmp tcp:0:5555,server,nowait \
-incoming tcp:0:6666 

{ "execute": "qmp_capabilities" }
{ "execute": "nbd-server-start", "arguments": { "addr": { "type": "inet", "data": { "host": "127.0.0.1", "port": "9999" } } } }
{ "execute": "nbd-server-add", "arguments": { "device": "img0", "writable": true } }

4. invoke drive-mirror on src to dest
{ "execute": "qmp_capabilities" }
{ "execute": "drive-mirror", "arguments": { "device": "img0", "target": "nbd://127.0.0.1:9999/img0", "sync": "full", "format": "raw", "mode": "existing" } }

5. reopen src to mirror when block mirror is ready
{"execute": "block-job-complete", "arguments": { "device": "img0"} }

6. invoke migration on src
(qemu) migrate -d tcp:0:6666

7. invoke nbd-server-stop when migration completes, and cont to start guest on dest
{ "execute" : "nbd-server-stop", "arguments" : {} }
(qemu) cont

After, the guest could run on dest. Both src and dest qemu could quit normally.
Comment 9 errata-xmlrpc 2017-11-30 15:34:33 EST
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/RHSA-2017:3369

Note You need to log in before you can comment on or make changes to this bug.