Bug 1008783

Summary: should block to do live migration when trying to migrate a qed image file
Product: Red Hat Enterprise Linux 6 Reporter: Sibiao Luo <sluo>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.5CC: acathrow, bsarathy, chayang, flang, jcody, juzhang, michen, mkenneth, qzhang, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-17 05:21:39 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 Sibiao Luo 2013-09-17 04:39:21 UTC
Description of problem:
According to bug 999779#c14, add qed migration blocker since qemu-kvm-0.12.1.2-2.402.el6.
- kvm-qed-add-migration-blocker-v2.patch [bz#999779] 
- kvm-qed-remove-incoming-live-migration-blocker.patch [bz#999779] 

But when do live migration with a in used qed format disk, QEMU should be blocked to do live migration and give a message prompt that "Block format 'qed' used by device 'drive-data-disk' does not support feature 'live migration".

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm
2.6.32-419.el6.x86_64
qemu-kvm-0.12.1.2-2.402.el6.x86_64
guest info:
2.6.32-419.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.create a qed format image via qemu-img.
# qemu-img info sluo-data-disk.qed 
image: sluo-data-disk.qed
file format: qed
virtual size: 5.0G (5368709120 bytes)
disk size: 193M
cluster_size: 65536
2.boot guest with qed format disk in src and do some i/o to the qed disk.
e.g:...drive file=/mnt/sluo-data-disk.qed,if=none,id=drive-data-disk,format=qed,cache=none,werror=stop,rerror=stop -device virtio-blk-pci,bus=pci.0,addr=0x7,drive=drive-data-disk,id=data-disk
guest] # dd if=/dev/zero of=/dev/vdb bs=10k
3.boot a dest with incoming mode.
<same-to-src-cli>-incoming tcp:0:5888,server,nowait
4.migration from src to dest and check it.
- src:
(qemu) migrate -d tcp:0:5888
(qemu) info migrate 
Migration status: active
total time: 3598 milliseconds
transferred ram: 100532 kbytes
remaining ram: 489272 kbytes
total ram: 2113920 kbytes
...
(qemu) info migrate 
Migration status: completed
total time: 16403 milliseconds
downtime: 87 milliseconds
transferred ram: 564873 kbytes
remaining ram: 160 kbytes
total ram: 2113920 kbytes
(qemu) q

-dest:
(qemu) c
(qemu) info status 
VM status: running

Actual results:
after step 4, it can complete migration from src to dest successfully.

Expected results:
QEMU should be blocked to do live migration with qed format image and should give a message prompt that "Block format 'qed' used by device 'drive-data-disk' does not support feature 'live migration".

Additional info:

Comment 1 Jeff Cody 2013-09-17 05:21:39 UTC
(In reply to Sibiao Luo from comment #0)
> Description of problem:
> According to bug 999779#c14, add qed migration blocker since
> qemu-kvm-0.12.1.2-2.402.el6.
> - kvm-qed-add-migration-blocker-v2.patch [bz#999779] 
> - kvm-qed-remove-incoming-live-migration-blocker.patch [bz#999779] 
> 

This is not a bug - in bug 999779, the intent was not to add a migration blocker for QED, but rather to pull in the migration blocker framework.  So the first patch quoted above added in parts of the migration framework, while the second patch removed the QED blocker itself.  So the net result (for QED) of those two patches is that QED remains unblocked for live migration.

Comment 2 Sibiao Luo 2013-09-17 07:58:20 UTC
(In reply to Jeff Cody from comment #1)
> (In reply to Sibiao Luo from comment #0)
> > Description of problem:
> > According to bug 999779#c14, add qed migration blocker since
> > qemu-kvm-0.12.1.2-2.402.el6.
> > - kvm-qed-add-migration-blocker-v2.patch [bz#999779] 
> > - kvm-qed-remove-incoming-live-migration-blocker.patch [bz#999779] 
> > 
> 
> This is not a bug - in bug 999779, the intent was not to add a migration
> blocker for QED, but rather to pull in the migration blocker framework.  So
> the first patch quoted above added in parts of the migration framework,
> while the second patch removed the QED blocker itself.  So the net result
> (for QED) of those two patches is that QED remains unblocked for live
> migration.
ok, got it, thanks for your explaining it for my mistake.