Bug 1095606

Summary: qemu-kvm should give some hint when hot-plug a devices with the same existing "scsi-id and lun"
Product: Red Hat Enterprise Linux 7 Reporter: Jun Li <juli>
Component: qemu-kvmAssignee: Markus Armbruster <armbru>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, hhuang, juzhang, michen, qiguo, sluo, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Windows   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1095609 (view as bug list) Environment:
Last Closed: 2014-07-17 09:34:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1095609    

Description Jun Li 2014-05-08 07:12:07 UTC
Description of problem:
when hot-plug a devices with the same existing "scsi-id  and lun", qemu-kvm can not give any error message or qemu-kvm should forbid this operation.

Version-Release number of selected component (if applicable):
3.10.0-123.el7.x86_64
qemu-kvm-1.5.3-60.el7_0.2.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot guest with a virtio-scsi device(specified scsi-id and lun), such as:
/usr/libexec/qemu-kvm -S -m 2G -smp 2 -monitor stdio -boot menu=on -vnc :1 -netdev tap,id=tap0,vhost=on,queues=4,script=/etc/qemu-ifup -device virtio-net-pci,mq=on,netdev=tap0,id=net0,vectors=10 -device virtio-scsi-pci,id=scsi0,bus=pci.0 -drive file=/dev/disk/by-path/ip-10.66.9.10:3260-iscsi-iqn.2013-11.com.example:storage.disk1.juli.xyz-lun-2,format=qcow2,if=none,id=img,media=disk -device scsi-hd,drive=img,id=sys-img,bus=scsi0.0,scsi-id=0,lun=0 -drive file=/home/juli/virtio-win-prewhql-80.iso,if=none,media=cdrom,id=cdrom0 -device scsi-cd,drive=cdrom0,id=sys-cdrom0,bus=scsi0.0,scsi-id=0,lun=1
2.hot-plug another scsi-cd device with the same existing "scsi-id=0 and lun=1".
(qemu) drive_add auto file=/home/juli/sn1.qcow2,if=none,id=test1
(qemu) device_add scsi-cd,drive=test1,id=sys-test1,bus=scsi0.0,scsi-id=0,lun=1
3.

Actual results:
after step 2, this operation will success. And this operation will overlap the existing device(sys-cdrom0).

Expected results:
can not hot-plug another scsi-cd device with the same existing "scsi-id=0 and lun=1".

Additional info:

Comment 2 Markus Armbruster 2014-06-24 14:03:27 UTC
Reproduced with current upstream.

Comment 3 Markus Armbruster 2014-07-16 08:23:42 UTC
Upstream commit 2039511 should take care of this.

Comment 4 Markus Armbruster 2014-07-17 09:34:03 UTC
Same bug as bug 1096576, just different symptoms.

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