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 848955 - hotunplug disk does not work in latest qemu-kvm-rhev build
Summary: hotunplug disk does not work in latest qemu-kvm-rhev build
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Markus Armbruster
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 896690
TreeView+ depends on / blocked
 
Reported: 2012-08-16 22:40 UTC by Liron Aravot
Modified: 2013-06-17 15:22 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-17 15:06:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
vdsm log (10.18 MB, text/x-log)
2012-08-22 08:42 UTC, Liron Aravot
no flags Details

Description Liron Aravot 2012-08-16 22:40:11 UTC
Description of problem:
boot on a host (RHEL 6.3) a guest machine (RHEL 6.2) that has 2 disks, tried to hot unplug one of those disks and got an error.


Thread-22831::ERROR::2012-08-17 01:14:45,569::libvirtvm::1547::vm.Vm::(hotunplugDisk) vmId=`14ac86bf-4f74-4a27-a9f7-667df5e27488`::Hotunplug failed
Traceback (most recent call last):
  File "/usr/share/vdsm/libvirtvm.py", line 1545, in hotunplugDisk
    self._dom.detachDevice(driveXml)
  File "/usr/share/vdsm/libvirtvm.py", line 487, in f
    ret = attr(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/vdsm/libvirtconnection.py", line 82, in wrapper
    ret = f(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 704, in detachDevice
    if ret == -1: raise libvirtError ('virDomainDetachDevice() failed', dom=self)
libvirtError: internal error unable to execute QEMU command 'device_del': Bus 'pci.0' does not support hotplugging
Thread-22831::DEBUG::2012-08-17 01:14:45,652::BindingXMLRPC::879::vds::(wrapper) return vmHotunplugDisk with {'status': {'message': "internal error unable to execute QEMU command 'device_del': Bus 'pci.0' does not support hotplugging", 'code': 46}}

the bug seems as a regression, the following cause error on version:
qemu-kvm-rhev-0.12.1.2-2.304.el6.x86_64
but works just fine with:
qemu-kvm-rhev-0.12.1.2-2.295.el6.x86_64

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-0.12.1.2-2.304.el6.x86_64


Steps to Reproduce:
1. create guest with 2 disks
2. install OS on host (RHEL)
3. while guest is running - try to hot unplug a disk.
  
Actual results:
getting the following error

Expected results: successful unplug of the selected disk.

Additional info:
attached libvirt/qemu/vdsm logs.

Comment 2 Ayal Baron 2012-08-17 12:22:29 UTC
Note that this worked fine for the same VM with only a different qemu version (both an older qemu-kvm-rhev and qemu-kvm).
All else remained equal.

Comment 3 juzhang 2012-08-20 08:58:21 UTC
Hi, Liron

kvm qe can not reproduce this issue via qemu-kvm command directly even lots hotunplug/hotplug repeatly, would you please answer the following questions?

1. reproducible rate ? 100%?
2. please attach the libvirt/qemu/vdsm logs
3. please provide the libvirt and vdsm version.

Additional infos
1. I also have a general testing via rhelm, can not reproduce.
#qemu-kvm-rhev-0.12.1.2-2.304.el6.x86_64
#libvirt-0.9.10-21.el6_3.3.x86_64
#vdsm-4.9.6-27.0.el6_3.x86_64


2. qemu-kvm reproduce steps 
1.start a rhel6.2 guest
/usr/libexec/qemu-kvm -M rhel6.2.0 -enable-kvm -m 2048 -smp
4,sockets=2,cores=2,threads=1 -name rhel6.3 -uuid
8842aa9e-2d20-4540-8557-4d04752a28d7 -drive
file=rhel6.2.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,serial=f82002eb-520c-469b-90c2-663277e90437,cache=none,werror=stop,rerror=stop,aio=native
-device
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
-spice disable-ticketing,port=5913 -vga qxl -drive
file=first-disk.qcow2,if=none,id=drive-virtio-disk1,format=qcow2,cache=none,werror=stop,rerror=stop,aio=native
-device
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk1,id=virtio-disk1
-monitor stdio -device sga -chardev
socket,id=serial0,path=/var/test1,server,nowait -device
isa-serial,chardev=serial0 -monitor unix:/var/mm,server,nowait -qmp
tcp:0:6666,server,nowait

2. hot plug three virtio-disks with script
    i=1
while [ $i -lt 32 ]
do
echo "__com.redhat_drive_del drive-virtio-disk1" |nc -U /var/mm
echo "device_del virtio-disk1" |nc -U /var/mm
echo "__com.redhat_drive_del drive-virtio-disk2" |nc -U /var/mm
echo "device_del virtio-disk2" |nc -U /var/mm
echo "__com.redhat_drive_del drive-virtio-disk3" |nc -U /var/mm
echo "device_del virtio-disk3" |nc -U /var/mm
#sleep 3
echo "__com.redhat_drive_add
file=first-disk.qcow2,id=drive-virtio-disk1,format=qcow2,cache=none" |nc
-U /var/mm
echo "device_add
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk1,id=virtio-disk1"|nc
-U /var/mm

sleep 2
echo "__com.redhat_drive_add
file=second-disk.qcow2,id=drive-virtio-disk2,format=qcow2,cache=none"
|nc -U /var/mm
echo "device_add
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk2,id=virtio-disk2"|nc
-U /var/mm

sleep 2
echo "__com.redhat_drive_add
file=third-disk.qcow2,id=drive-virtio-disk3,format=qcow2,cache=none" |nc
-U /var/mm
echo "device_add
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x8,drive=drive-virtio-disk3,id=virtio-disk3"|nc
-U /var/mm

i=$(($i+1))
sleep 1
done

3. monitor terminal and system log
   monitor qmp:
   telnet 10.66.104.54 6666
   {"execute": "qmp_capabilities"}

   monitor serial output
   nc -U /var/test1

    monitor syslog in guest
    tail -f /var/log/messages

Comment 4 Liron Aravot 2012-08-22 08:42:50 UTC
Created attachment 606173 [details]
vdsm log

Comment 5 Liron Aravot 2012-08-22 08:56:09 UTC
vdsm version :
vdsm-4.10.0-0.313.git8bedc7e.el6.x86_64

libvirt version:
libvirt-0.9.10-21.el6.x86_64


futher information - i tried this on two hosts, in one of them when i reinstalled the newer version (qemu-kvm-rhev-0.12.1.2-2.304.el6.x86_64) it did work after earlier it didn't - so i don't know what causes this error, but it seems to be some inconsistent behaviour that it's worth to check.

Comment 6 Liron Aravot 2012-08-22 08:57:27 UTC
in one host it didn't work with either version of qemu-kvm-rhev (the attached log is from that host).

Comment 7 juzhang 2012-08-23 01:51:07 UTC
FYI
Bug 807023 - libvirt does not check for successful device_del

Comment 8 Markus Armbruster 2012-09-07 09:54:17 UTC
Please provide /var/log/libvirt/qemu/<guest-name>.log for a failed test.


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