Bug 969968 - 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...
Status: CLOSED DUPLICATE of bug 771545
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm   
(Show other bugs)
Version: 7.0
Hardware: Unspecified Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Marcel Apfelbaum
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Keywords:
Depends On: 963588
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-03 08:21 UTC by Sibiao Luo
Modified: 2013-11-03 12:57 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 963588
Environment:
Last Closed: 2013-11-03 12:57:20 UTC
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 771545 None None None Never

Comment 1 Sibiao Luo 2013-06-03 08:23:33 UTC
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 14:55:57 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.

Comment 3 Marcel Apfelbaum 2013-09-16 10:22:57 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 4 Ronen Hod 2013-11-03 12:57:20 UTC

*** 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.