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 596274 - QMP: netdev_del sometimes fails claiming the device is in use
Summary: QMP: netdev_del sometimes fails claiming the device is in use
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Markus Armbruster
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 580953
TreeView+ depends on / blocked
 
Reported: 2010-05-26 14:05 UTC by Daniel Berrangé
Modified: 2013-01-09 22:37 UTC (History)
5 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.82.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-02 05:09:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Daniel Berrangé 2010-05-26 14:05:00 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1. Boot a guest with

LC_ALL=C PATH=/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin HOME=/root USER=root LOGNAME=root /usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 64 -smp 1,sockets=1,cores=1,threads=1 -name tck -uuid 2e7bb6f8-082a-2cc7-dcce-daef2e693c35 -nographic -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/tck.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=utc -boot c -kernel /var/cache/libvirt-tck/os-i686-hvm/vmlinuz -initrd /var/cache/libvirt-tck/os-i686-hvm/initrd -drive file=/var/cache/libvirt-tck/os-i686-hvm/disk.img,if=none,id=drive-virtio-disk0,boot=on -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 


Where that 'vmlinuz' and 'initrd.img' files are the ones from

     kernel = http://download.fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/i386/os/images/pxeboot/vmlinuz-PAE
     initrd = http://download.fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/i386/os/images/pxeboot/initrd-PAE.img

And 'disk.img' is just an uninitialized 100MB sparse file



2. Hotplug a netdev backend

{"execute":"netdev_add","arguments":{"type":"user","id":"hostnet0"}}

3. Hotplug a NIC device

{"execute":"device_add","arguments":{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.0","addr":"0x5"}}

4. Hotunplug the NIC device

{"execute":"device_del","arguments":{"id":"net0"}}

5. Hotunplug the netdev backend

{"execute":"netdev_del","arguments":{"id":"hostnet0"}}


  
Actual results:
{"error": {"class": "DeviceInUse", "desc": "Device 'hostnet0' is in use", "data": {"device": "hostnet0"}}}


Expected results:
netdev_del succeeds.  NB the reason why its claiming it is still in use, is that this kernel probably isn't processing the ACPI unplug event for the guest NIC.  Regardless netdev_del should still be able to succeeed, leaving the NIC with a "null" backend

Additional info:

Comment 2 RHEL Program Management 2010-05-28 11:55:31 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 6 juzhang 2010-06-28 09:44:58 UTC
Using the comment0 steps

Reproduced on qemu-kvm-0.12.1.2-2.77.el6

After step 5,qmp emit the following message.

"{"error": {"class": "DeviceInUse", "desc": "Device 'hostnet2' is in use", "data": {"device": "hostnet2"}}}"

Verified on qemu-kvm-0.12.1.2-2.82.el6


before step5
Devices not on any VLAN:
  net1: model=virtio-net-pci,macaddr=1a:2b:3c:4d:5f:6e
  hostnet2: ifname=tap0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown

after step5
Devices not on any VLAN:
net1: model=virtio-net-pci,macaddr=1a:2b:3c:4d:5f:6e

Results:
{"return": {}}
netdev_del succeeds.

Comment 8 juzhang 2010-07-02 05:09:03 UTC
according to comment6,close this issue.


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