Bug 969968 - qemu will quit when hot plug a device with a bootindex number that was already used by other device
qemu will quit when hot plug a device with a bootindex number that was alread...
Status: CLOSED DUPLICATE of bug 771545
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
Unspecified Unspecified
high Severity medium
: rc
: ---
Assigned To: Marcel Apfelbaum
Virtualization Bugs
:
Depends On: 963588
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-03 04:21 EDT by Sibiao Luo
Modified: 2013-11-03 07:57 EST (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 963588
Environment:
Last Closed: 2013-11-03 07:57:20 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 1 Sibiao Luo 2013-06-03 04:23:33 EDT
host info:
3.10.0-0.rc2.57.el7.x86_64
qemu-kvm-1.5.0-2.el7.x86_64

# /usr/libexec/qemu-kvm -cpu SandyBridge -M pc-i440fx-1.5 -enable-kvm -S -m 4G -smp 4,sockets=2,cores=2,threads=1...-netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device rtl8139,netdev=hostnet0,id=rtl8139-net-pci0,mac=08:2e:5f:0a:0d:a1,bus=pci.0,addr=0x5,bootindex=2...
(qemu) info network 
rtl8139-net-pci0: index=0,type=nic,model=rtl8139,macaddr=08:2e:5f:0a:0d:a1
 \ hostnet0: index=0,type=tap,ifname=tap1,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
(qemu) netdev_add tap,id=hostnet1,vhost=on,script=/etc/qemu-ifup
(qemu) device_add virtio-net-pci,netdev=hostnet1,id=virtio-net-pci0,bus=pci.0,bootindex=2
Two devices with same boot index 2
/etc/qemu-ifdown: could not launch network script
/etc/qemu-ifdown: could not launch network script
Comment 2 Markus Armbruster 2013-06-07 10:55:57 EDT
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.
Comment 3 Marcel Apfelbaum 2013-09-16 06:22:57 EDT
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 4 Ronen Hod 2013-11-03 07:57:20 EST

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

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