RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1139572 - fail to hot-unplug virtio-blk dataplane via __com.redhat_drive_del/device_del command
Summary: fail to hot-unplug virtio-blk dataplane via __com.redhat_drive_del/device_del...
Keywords:
Status: CLOSED DUPLICATE of bug 1136752
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Stefan Hajnoczi
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-09 08:43 UTC by Sibiao Luo
Modified: 2014-09-11 14:18 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-11 14:18:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sibiao Luo 2014-09-09 08:43:24 UTC
Description of problem:
Launch a KVM guest with a virtio-blk dataplane data disk, then do hotunplug it via __com.redhat_drive_del before device_del command, but it fail to unplug it successfully.
BTW, if disable the dataplane to do the same test which cann't hit this issue.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm-rhev
3.10.0-152.el7.x86_64
qemu-kvm-rhev-2.1.0-3.el7.x86_64
guest info:
3.10.0-152.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.launch a KVM guest with a virtio-blk dataplane data disk.
e.g:...-object iothread,id=iothread0 -drive file=/home/my-data-disk.qcow2,if=none,id=drive-data-disk0,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,drive=drive-data-disk0,id=data-disk0,iothread=iothread0,bus=pci.0,addr=0x7
2.do hotunplug it via __com.redhat_drive_del before device_del command.
3.run device_del command directly.

Actual results:
after step 2, it fail hot-unplug the virtio-blk dataplane data disk, and fail to give a coorectly error prompt via QMP while it prompt a " block device is in use by data plane" in HMP monitor.

{"execute":"__com.redhat_drive_del","arguments":{"id":"drive-data-disk0"}}
{"error": {"class": "GenericError", "desc": "An undefined error has occurred"}}
                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(qemu) Device 'drive-data-disk0' is busy: block device is in use by data plane

after step 3, it can hot-unplug the virtio-blk dataplane data disk successfully. 
{"execute":"device_del","arguments":{"id":"data-disk0"}}
{"return": {}}
{"timestamp": {"seconds": 1410251110, "microseconds": 449966}, "event": "DEVICE_DELETED", "data": {"path": "/machine/peripheral/data-disk0/virtio-backend"}}
{"timestamp": {"seconds": 1410251110, "microseconds": 452201}, "event": "DEVICE_DELETED", "data": {"device": "data-disk0", "path": "/machine/peripheral/data-disk0"}}

Expected results:
1.If virtio-blk dataplane support to hotunplug via __com.redhat_drive_del/device_del, we should fix it to work.
2.If virtio-blk dataplane not support it, QMP should give a correct error info prompt, like HMP.
(qemu) drive_del drive-data-disk0
Device 'drive-data-disk0' is busy: block device is in use by data plane

{"execute":"__com.redhat_drive_del","arguments":{"id":"drive-data-disk0"}}
{"error": {"class": "GenericError", "desc": "An undefined error has occurred"}}
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                           block device is in use by data plane
Additional info:
Also tried the virtio-blk data disk without data-plane enable which did not hit it.
e.g:...-drive file=/home/my-data-disk.qcow2,if=none,id=drive-data-disk0,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,drive=drive-data-disk0,id=data-disk0,bus=pci.0,addr=0x7
{"execute":"qmp_capabilities"}
{"return": {}}
{"execute":"__com.redhat_drive_del","arguments":{"id":"drive-data-disk0"}}
{"return": {}}
{"execute":"device_del","arguments":{"id":"data-disk0"}}
{"return": {}}
{"timestamp": {"seconds": 1410251193, "microseconds": 52349}, "event": "DEVICE_DELETED", "data": {"path": "/machine/peripheral/data-disk0/virtio-backend"}}
{"timestamp": {"seconds": 1410251193, "microseconds": 52455}, "event": "DEVICE_DELETED", "data": {"device": "data-disk0", "path": "/machine/peripheral/data-disk0"}}

Comment 1 Stefan Hajnoczi 2014-09-11 14:18:47 UTC

*** This bug has been marked as a duplicate of bug 1136752 ***


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