Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 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 ***