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 1025342

Summary: scsi-generic should not flush the LUN on exit, unless targeting a disk or a CD-ROM LUN
Product: Red Hat Enterprise Linux 7 Reporter: Paolo Bonzini <pbonzini>
Component: qemu-kvmAssignee: Fam Zheng <famz>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.0CC: acathrow, hhuang, juzhang, knoel, michen, pbonzini, sluo, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1020581 Environment:
Last Closed: 2014-04-04 07:01:14 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: 1058173    
Bug Blocks:    

Description Paolo Bonzini 2013-10-31 14:09:38 UTC
+++ This bug was initially created as a clone of Bug #1020581 +++

Description of problem:
Using system_reset to reboot guest with libscisi(lun 0) via monitor. It will cause qemu-kvm core dump. The following is target infos in host.  

# tgtadm --lld iscsi --op show --mode target
Target 1: libscisi-test
    System information:
        Driver: iscsi
        State: ready
    I_T nexus information:
        I_T nexus: 45
            Initiator: iqn.2008-11.org.linux-kvm
            Connection: 0
                IP Address: 10.66.106.31
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: IET     00010000
            SCSI SN: beaf10
            Size: 0 MB, Block size: 1
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: null
            Backing store path: None
            Backing store flags: 
        LUN: 1
            Type: disk
            SCSI ID: IET     00010001
            SCSI SN: beaf11
            Size: 215214 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /dev/sda3
            Backing store flags: 
    Account information:
    ACL information:
        ALL


Version-Release number of selected component (if applicable):
qemu-kvm-1.5.3-9.el7.x86_64
3.10.0-35.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1./usr/libexec/qemu-kvm -vnc :3 -monitor stdio -drive file=iscsi://10.66.8.151:3260/libscisi-test/0,if=none,id=drive-disk -device virtio-scsi-pci,id=scsi1,bus=pci.0,addr=0x6 -device scsi-generic,drive=drive-disk,bus=scsi1.0,id=iscsi-disk

2.quit

Actual results:
qemu-system-x86_64: Failed to sync10 data on iSCSI lun. SENSE KEY:ILLEGAL_REQUEST(5) ASCQ:INVALID_OPERATION_CODE(0x2000)
qemu-system-x86_64: Failed to sync10 data on iSCSI lun. SENSE KEY:ILLEGAL_REQUEST(5) ASCQ:INVALID_OPERATION_CODE(0x2000)

Expected results:
no such message

Additional info:
create lun detailed steps:
#service tgtd start
#tgtadm --lld iscsi --op new --mode target --tid=1 --targetname libscisi-test
# tgtadm --lld iscsi --op show --mode target
# tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /dev/sda3
# tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL

Comment 2 Fam Zheng 2014-04-04 07:01:14 UTC
Fix is included in https://bugzilla.redhat.com/show_bug.cgi?id=1083413, close as DUPLICATE.

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

Comment 3 Paolo Bonzini 2014-04-04 11:33:39 UTC
*** Bug 1078650 has been marked as a duplicate of this bug. ***