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 1078650 - bdrv_flush_all() should skip scsi-generic devices
Summary: bdrv_flush_all() should skip scsi-generic devices
Keywords:
Status: CLOSED DUPLICATE of bug 1025342
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Paolo Bonzini
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-20 05:58 UTC by Sibiao Luo
Modified: 2014-04-04 11:33 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-04 11:33:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sibiao Luo 2014-03-20 05:58:05 UTC
Description of problem:
this issue was found when re-tried bug 1067784 which meet 'qemu-kvm: Failed to sync10 data on iSCSI lun. SENSE KEY:ILLEGAL_REQUEST(5) ASCQ:INVALID_OPERATION_CODE(0x2000)' when shutdown guest if i use scsi-generic to specified the LUN 0 of my iscsi target with '/0'.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm
3.10.0-113.el7.x86_64
qemu-kvm-1.5.3-55.el7.x86_64
guest info:
# uname -r
3.10.0-113.el7.x86_64

How reproducible:
3/3

Steps to Reproduce:
1. Prepare the iscsi target server:
1) On the iscsi target server, created the target by adding an XML entry to the configuration file:

# vim /etc/tgt/targets.conf
<target iqn.2008-09.com.example:server.target2>
    backing-store /iscsi.img
    incominguser redhat redhat
</target>

# service tgtd restart
# tgt-admin --show
Target 1: iqn.2008-09.com.example:server.target2
    System information:
        Driver: iscsi
        State: ready
...
    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: 2097 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /iscsi.img
            Backing store flags: 
    Account information:
        redhat
    ACL information:
        ALL

2. Prepare the iscsi initator:

# vim /etc/iscsi/iscsid.conf
node.session.auth.authmethod = CHAP
node.session.auth.username = redhat
node.session.auth.password = redhat

# service iscsid restart

# iscsiadm --mode discovery --type sendtargets --portal 10.66.9.107 –discover
10.66.9.107:3260,1 iqn.2008-09.com.example:server.target2

# iscsiadm -m node -T iqn.2008-09.com.example:server.target2 -p 10.66.9.107 -l
Logging in to [iface: default, target: iqn.2008-09.com.example:server.target2, portal: 10.66.9.107,3260] (multiple)
Login to [iface: default, target: iqn.2008-09.com.example:server.target2, portal: 10.66.9.107,3260] successful.

# iscsiadm -m node -T iqn.2008-09.com.example:server.target2 -p 10.66.9.107 --logout
Logging out of session [sid: 5, target: iqn.2008-09.com.example:server.target2, portal: 10.66.9.107,3260]
Logout of [sid: 5, target: iqn.2008-09.com.example:server.target2, portal: 10.66.9.107,3260] successful.

3. Boot a guest using scsi-generic to specified the LUN 0 of my iscsi target with '/0' with chap authentication.
e.g:...-drive file=iscsi://10.66.9.107/iqn.2008-09.com.example:server.target1/0,if=none,id=drive-data-disk,format=raw,cache=none,aio=native -iscsi id=iqn1,user=redhat,password=redhat -device virtio-scsi-pci,id=scsi1,bus=pci.0,addr=0x7 -device scsi-generic,drive=drive-data-disk,bus=scsi1.0,id=data-disk

4.check the disk in guest with 'fdisk -l'.

5. shutdown guest.
guest ]# poweroff

Actual results:
after step 3, boot up guest successfully.
(qemu) info block
drive-data-disk: removable=0 file=iscsi://10.66.9.107/iqn.2008-09.com.example:server.target1/0 ro=0 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
...
after step 4, did not find the disk as there is disk for LUN 0.
after step 5, meet 'qemu-kvm: Failed to sync10 data on iSCSI lun. SENSE KEY:ILLEGAL_REQUEST(5) ASCQ:INVALID_OPERATION_CODE(0x2000)' when shutdown guest if i use scsi-generic to specified the LUN 0 of my iscsi target with '/0'.
(qemu) qemu-kvm: Failed to sync10 data on iSCSI lun. SENSE KEY:ILLEGAL_REQUEST(5) ASCQ:INVALID_OPERATION_CODE(0x2000)
qemu-kvm: Failed to sync10 data on iSCSI lun. SENSE KEY:ILLEGAL_REQUEST(5) ASCQ:INVALID_OPERATION_CODE(0x2000)

Expected results:
it should no any error when poweroff guest.

Additional info:
# /usr/libexec/qemu-kvm -M pc -enable-kvm -m 4096 -smp 4 -no-kvm-pit-reinjection -usb -device usb-tablet,id=input0 -name sluo -uuid 990ea161-6b67-47b2-b803-19fb01d30d30 -rtc base=localtime,clock=host,driftfix=slew -drive file=/home/RHEL-Server-7.0-64-virtio.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,vectors=0,bus=pci.0,addr=0x4,scsi=off,drive=drive-system-disk,id=system-disk,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=00:01:02:03:40:21,bus=pci.0,addr=0x5 -k en-us -boot menu=on -qmp tcp:0:5555,server,nowait -serial unix:/tmp/ttyS0,server,nowait -vnc :1 -spice disable-ticketing,port=5931 -monitor stdio -drive file=iscsi://10.66.9.107/iqn.2008-09.com.example:server.target1/0,if=none,id=drive-data-disk,format=raw,cache=none,aio=native -iscsi id=iqn1,user=redhat,password=redhat -device virtio-scsi-pci,id=scsi1,bus=pci.0,addr=0x7 -device scsi-generic,drive=drive-data-disk,bus=scsi1.0,id=data-disk

Comment 1 Paolo Bonzini 2014-04-02 13:06:34 UTC
It will be fixed by upstream commit 049db02e38b65aff6c7871ee3614092f886ce07d.

Comment 2 Paolo Bonzini 2014-04-04 11:33:38 UTC

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


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