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 963588 - qemu will quit when hot plug a device with a bootindex number that was already used by other device
Summary: qemu will quit when hot plug a device with a bootindex number that was alread...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.5
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Marcel Apfelbaum
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 771545 1086603 1314591 1362084
Blocks: 969968
TreeView+ depends on / blocked
 
Reported: 2013-05-16 08:16 UTC by Sibiao Luo
Modified: 2016-09-29 11:42 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 969968 (view as bug list)
Environment:
Last Closed: 2014-07-13 14:25:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 771545 0 low CLOSED qemu should give friendly messages instead of quitting when Hot-plugging two devices with the same bootindex values 2021-02-22 00:41:40 UTC

Internal Links: 771545

Description Sibiao Luo 2013-05-16 08:16:58 UTC
Description of problem:
boot a guest specified with bootindex number, and then hot plug a device with a bootindex number that was already used by other device, the qemu quit occur.

Version-Release number of selected component (if applicable):
host info:
kernel-2.6.32-377.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.369.el6.x86_64
seabios-0.6.1.2-27.el6.x86_64
guest info:
kernel-2.6.32-377.el6.x86_64

How reproducible:
3/3

Steps to Reproduce:
1.boot up a guest specified with bootindex number.
e.g:# /usr/libexec/qemu-kvm -S -M rhel6.5.0 -cpu host -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -no-kvm-pit-reinjection -name sluo-test -uuid a51eb497-bfd7-47c0-8b5b-0853716e3ce5 -rtc base=localtime,clock=host,driftfix=slew -drive file=/home/RHEL-Server-6.4-64-virtio.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop,serial=QEMU-DISK1 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-system-disk,id=system-disk,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=08:2e:5f:0a:1d:b1,bus=pci.0,addr=0x5,bootindex=2,ioeventfd=off -device virtio-balloon-pci,id=ballooning,bus=pci.0,addr=0x6 -qmp tcp:0:4444,server,nowait -k en-us -boot menu=on -vnc :1 -spice disable-ticketing,port=5931 -vga qxl -monitor stdio
2.hot plug a device with a bootindex number that was already used by other device.
(qemu) __com.redhat_drive_add file=/dev/sdd,id=drive-scsi-disk,format=raw,media=disk,cache=none,aio=native
(qemu) device_add virtio-blk-pci,scsi=on,bus=pci.0,addr=0x7,drive=drive-scsi-disk,id=scsi-disk,bootindex=2
  
Actual results:
after step 2, qemu will quit with error prompt. check the host dmesg that have nothing related to it.
(qemu) __com.redhat_drive_add file=/dev/sdd,id=drive-scsi-disk,format=raw,media=disk,cache=none,aio=native
(qemu) device_add virtio-blk-pci,scsi=on,bus=pci.0,addr=0x7,drive=drive-scsi-disk,id=scsi-disk,bootindex=2
Two devices with same boot index 2
/etc/qemu-ifdown: could not launch network script

Expected results:
qemu should not quit,  just error prompt is enough.

Additional info:

Comment 2 Markus Armbruster 2013-06-07 14:57:20 UTC
Root cause: add_boot_device_path() calls exit() instead of returning failure.

To fix, we need to make it return an error code, and forward it up all call chains until we reach the spot where it should be handled.  I don't expect it to be hard, just t-e-d-i-o-u-s.

Upstream first.

Comment 7 Marcel Apfelbaum 2013-09-16 10:23:02 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 12 Ronen Hod 2014-07-13 14:25:02 UTC
Will be handled in RHEL7 BZ#771545.
Closing, since not important enough for RHEL6


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