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 771545 - qemu should give friendly messages instead of quitting when Hot-plugging two devices with the same bootindex values
Summary: qemu should give friendly messages instead of quitting when Hot-plugging two ...
Keywords:
Status: CLOSED DUPLICATE of bug 1086603
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.0
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Marcel Apfelbaum
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 969968 (view as bug list)
Depends On:
Blocks: 963588
TreeView+ depends on / blocked
 
Reported: 2012-01-04 02:53 UTC by FuXiangChun
Modified: 2014-11-02 14:11 UTC (History)
10 users (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 963588 0 high CLOSED qemu will quit when hot plug a device with a bootindex number that was already used by other device 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 969968 0 high CLOSED qemu will quit when hot plug a device with a bootindex number that was already used by other device 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1006384 0 unspecified CLOSED Hot-unplugging a device does not remove it from the "devices boot order" list 2021-02-22 00:41:40 UTC

Internal Links: 963588 969968 1006384

Description FuXiangChun 2012-01-04 02:53:10 UTC
Description of problem:
Currently,if using the same bootindex values to hot-plug two devices, qemu will quit immediately. 

Version-Release number of selected component (if applicable):
# rpm -qa|grep qemu
qemu-kvm-tools-0.12.1.2-2.212.el6.x86_64
# uname -r
2.6.32-220.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.# /usr/libexec/qemu-kvm -M rhel6.2.0 -m 4096 -smp
4,cores=2,threads=1,sockets=2 -cpu cpu64-rhel6,+sse2,+x2apic -name rhel6.2-64
-chardev socket,id=serial_id_20111215,path=/tmp/serial,server,nowait -device
isa-serial,chardev=serial_id_20111215 -drive
file=/home/win2008r2-sp1-3.qcow2,index=0,if=none,id=drive-virtio-disk1,media=disk,cache=none,format=qcow2,aio=native
-device
virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk1,id=virtio-disk1,bootindex=1
-device
virtio-net-pci,netdev=idbEmLYK,mac=9a:3c:3a:f0:b4:1a,id=ndev00idbEmLYK,bus=pci.0,addr=0x3
-netdev tap,id=idbEmLYK,vhost=on -rtc base=utc,clock=host,driftfix=slew -boot
order=cdn,once=d,menu=on -no-kvm-pit-reinjection -usb -device usb-tablet
-enable-kvm -chardev
socket,id=qmp_monitor_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1,server,nowait
-mon chardev=qmp_monitor_id_qmpmonitor1,mode=control -spice
port=5912,disable-ticketing -vga qxl -monitor stdio -drive
file=/home/second-disk-3.qcow2,index=1,if=none,id=drive-virtio-disk2,media=disk,cache=none,format=qcow2,aio=native
-device
virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk2,id=virtio-disk2,bootindex=2

2.(qemu)device_del virtio-disk2

3.(qemu) __com.redhat_drive_add
file=/home/second-disk-3.qcow2,id=drive-virtio-disk2,media=disk,cache=none,format=qcow2,aio=native
(qemu) device_add
virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk2,id=virtio-disk2,bootindex=2
  
Actual results:
qemu quit, and show below info
Two devices with same boot index 2

Expected results:
qemu work well(shouldn't quit) and reserve tips for correct information

Additional info:

Comment 1 juzhang 2012-01-04 03:08:15 UTC
> 2.(qemu)device_del virtio-disk2
> 
> 3.(qemu) __com.redhat_drive_add
> file=/home/second-disk-3.qcow2,id=drive-virtio-disk2,media=disk,cache=none,format=qcow2,aio=native
> (qemu) device_add
> virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk2,id=virtio-disk2,bootindex=2
> 
Maybe the key reason is step2 "device_del virtio-disk2" did not remove
bootindex flag:"bootindex=2". As usual,device_del should delete all
virtio-disk2 related flags and address. after device_del, all flags and address
can be re-use.

Comment 2 Ronen Hod 2012-01-05 16:39:23 UTC
Gleb,
Dev_ack+ for 6.4, to allow you a convenient moment to deal with this err-msg issue.
We'll move to 6.3 if you do it earlier.

Comment 3 Karen Noel 2012-05-30 12:05:52 UTC
Not worth fixing for RHEL 6.x because customers are unlikely to hit this problem. 

-> Move to 7.0.

Comment 5 Marcel Apfelbaum 2013-09-10 11:06:57 UTC
Removed RFE since is a plain bug.
Splitting into 2 bugs:
1. qemu should give a message and return error and not quit
2. del_device should remove the device from boot order list

I am going to work on it, so cond_nack upstream.

Comment 6 Marcel Apfelbaum 2013-09-16 10:22:31 UTC
The boot order is passed in fw cfg and updated only once at
"machine done". There is no update of this list after this point.
Modifying the boot order from monitor does not work at all.
 
 So in order to solve this issue we can:
 1. Don't allow use of bootindex at hot-plug
 2. Change the architecture so boot order changing during hot-plug will be possible

Currently discussed upstream

Comment 8 Ronen Hod 2013-11-03 12:57:20 UTC
*** Bug 969968 has been marked as a duplicate of this bug. ***

Comment 10 Marcel Apfelbaum 2014-11-02 13:59:14 UTC
Moved to qemu-kvm-rhev because:
1. It is not a regression
2. The upstream featyre has a 30 patches series that solves a much bigger issue: botindex change between VM reboots

Comment 11 Marcel Apfelbaum 2014-11-02 14:11:30 UTC
BZ 1086603 is much wider and the upstream series solves it.

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


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