Bug 627551 - SCSI inquiry error message in rhel6 guest when there is qemu emulated scsi disk
Summary: SCSI inquiry error message in rhel6 guest when there is qemu emulated scsi disk
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen
Version: 5.6
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Michal Novotny
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 514500
TreeView+ depends on / blocked
 
Reported: 2010-08-26 11:41 UTC by Pengzhen Cao
Modified: 2014-02-02 22:38 UTC (History)
7 users (show)

Fixed In Version: xen-3.0.3-122.el5
Doc Type: Bug Fix
Doc Text:
When an HVM guest with several disks emulated as SCSI via the QEMU emulator booted, numerous SCSI inquiry errors were returned. With this update, a patch has been provided to properly handle the varying length of the inquiry commands, and the aforementioned error messages are no longer returned.
Clone Of:
Environment:
Last Closed: 2011-07-21 09:17:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
log message (13.91 KB, application/x-gzip)
2010-08-26 11:44 UTC, Pengzhen Cao
no flags Details
SCSI: Handle inquiry commands of varying length (2.56 KB, patch)
2010-11-30 11:31 UTC, Michal Novotny
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1070 0 normal SHIPPED_LIVE xen bug fix and enhancement update 2011-07-21 09:12:56 UTC

Description Pengzhen Cao 2010-08-26 11:41:09 UTC
Description of problem:
There is SCSI inquiry and mode sense error message during boot process of rhel6 hvm guest, when there is qemu emulated scsi disk connect

Version-Release number of selected component (if applicable):
xen-3.0.3-115 and older version like xen-3.0.3-105
kernel-xen-2.6.18-212

How reproducible:
100%

Steps to Reproduce:
1. create a rhel6 hvm guest
2. create 1~3 blank disk image with qemu-img 
3. edit the hvm cfg file and add these disks as qemu scsi disk, and then boot
  
Actual results:
error messages like the following show:
------
scsi scan: INQUIRY result too short (5), using 36
scsi 2:0:0:0: Direct-Access                                    PQ: 0 ANSI: 0
scsi 2:0:0:0: Information Units disabled by blacklist
scsi target2:0:0: Beginning Domain Validation
scsi target2:0:0: Ending Domain Validation
scsi scan: INQUIRY result too short (5), using 36
scsi scan: INQUIRY result too short (5), using 36
scsi 2:0:1:0: Direct-Access                                    PQ: 0 ANSI: 0
scsi 2:0:1:0: Information Units disabled by blacklist
scsi target2:0:1: Beginning Domain Validation
scsi target2:0:1: Ending Domain Validation
scsi scan: INQUIRY result too short (5), using 36
scsi scan: INQUIRY result too short (5), using 36
scsi 2:0:2:0: Direct-Access                                    PQ: 0 ANSI: 0
scsi 2:0:2:0: Information Units disabled by blacklist
scsi target2:0:2: Beginning Domain Validation
scsi target2:0:2: Ending Domain Validation
scsi scan: INQUIRY result too short (5), using 36
sd 2:0:0:0: [sdb] 2097152 512-byte logical blocks: (1.07 GB/1.00 GiB)
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Mode Sense: 13 00 00 00
sd 2:0:0:0: [sdb] Got wrong page
sd 2:0:0:0: [sdb] Assuming drive cache: write through
sd 2:0:1:0: [sdc] 2097152 512-byte logical blocks: (1.07 GB/1.00 GiB)
sd 2:0:1:0: [sdc] Write Protect is off
sd 2:0:1:0: [sdc] Mode Sense: 13 00 00 00
sd 2:0:1:0: [sdc] Got wrong page
sd 2:0:1:0: [sdc] Assuming drive cache: write through
sd 2:0:0:0: [sdb] Got wrong page
sd 2:0:0:0: [sdb] Assuming drive cache: write through
 sdb:
--------------

Expected results:
No error message should show during boot process

Additional info:

1. this is not regression due to AIO scsi patch, as same error show with xen-3.0.3-105.
2. there is no error message show with rhel5 guest, but when check the qemu-dm.log file, there is also error message like: "scsi-disk: Inquiry buffer too small (4)", so there may be same error.

Comment 1 Pengzhen Cao 2010-08-26 11:44:53 UTC
Created attachment 441177 [details]
log message

xend.log, qemu-dm.log, guest_vm log

Comment 2 Miroslav Rezanina 2010-08-30 11:36:43 UTC
Few questions to test (as I have some problems to reproduce):

1) Are the disk working after this error??
2) Is this happening every boot or just first?
3) If the disks are working and error appears every boot, does this error appear after you create some partition on the disk?

Comment 3 Pengzhen Cao 2010-08-30 13:09:50 UTC
(In reply to comment #2)
> Few questions to test (as I have some problems to reproduce):
> 
> 1) Are the disk working after this error??
The disk is working fine with this error. 
> 2) Is this happening every boot or just first?
It is happening every time
> 3) If the disks are working and error appears every boot, does this error
> appear after you create some partition on the disk?
It has nothing to do with partitions, there is still this error even when there is partition.And I think this is error message in the scsi protocol layer, so nothing to do with  partitions. 

And you can use RHEL6 64bit guest to repro, kernel version is 2.6.32-59.1.
You can check error message in /var/log/dmesg after boot.

Comment 4 Michal Novotny 2010-11-30 11:00:35 UTC
This is connected to the requirement to implement variable INQUIRY length AFAIK. I think that the relevant qemu git unstable commit is 57575058 [1].

I'm going to implement and test it.

Michal

[1] http://xenbits.xensource.com/gitweb?p=qemu-xen-unstable.git;a=commit;h=575750581c6ea70e89a7889cb6028f234f9d2ee9

Comment 5 Michal Novotny 2010-11-30 11:31:44 UTC
Created attachment 463697 [details]
SCSI: Handle inquiry commands of varying length

This is the patch for BZ #627551 to handle the varying length of the
inquiry commands. It's a backport of upstream commit 57575058 [1] written
by Justin Chevrier for purposes of running Openserver 5.0.5 with emulated
SCSI disks. Without this patch the Openserver panics because it expects
inquiry length of 40 bytes. This patch is required for RHEL-6 guests not
to write "scsi scan: INQUIRY result too short (5), using 36" error messages.

It's been tested on x86_64 dom0 and RHEL-6 x86_64 guest and before the patch
was applied there were "INQUIRY result too short" messages present but after
applying the patch there were no such messages in the guest's dmesg output
so the patch is working fine.

Michal

Signed-off-by: Michal Novotny <minovotn>

Comment 8 RHEL Program Management 2011-01-11 19:49:26 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 9 RHEL Program Management 2011-01-12 15:21:14 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 12 Yuyu Zhou 2011-03-22 03:14:12 UTC
This bug is reproduced on xen-3.0.3-105.el5 and verified on xen-3.0.3-126.el5. Details as following:

Steps to reproduce:
Since the xen-3.0.3-115 is deleted on brew, reproduce the bug on xen-3.0.3-105.el5
1. create 2 blank disks image with qemu-img
2. create a rhel hvm guest with these disks as qemu scsi disk, and then boot.
3. log in the  guest and check dmesg info.

Actual results:
scsi scan: INQUIRY result too short (5), using 36
scsi 2:0:0:0: Direct-Access                                    PQ: 0 ANSI: 0
scsi 2:0:0:0: Information Units disabled by blacklist
scsi target2:0:0: Beginning Domain Validation
scsi target2:0:0: Ending Domain Validation
scsi scan: INQUIRY result too short (5), using 36
scsi 2:0:1:0: Direct-Access                                    PQ: 0 ANSI: 0
scsi 2:0:1:0: Information Units disabled by blacklist
scsi target2:0:1: Beginning Domain Validation
scsi target2:0:1: Ending Domain Validation
sd 2:0:0:0: [sdb] 20480 512-byte logical blocks: (10.4 MB/10.0 MiB)
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Mode Sense: 13 00 00 00
sd 2:0:1:0: [sdc] 40960 512-byte logical blocks: (20.9 MB/20.0 MiB)
sd 2:0:1:0: [sdc] Write Protect is off
sd 2:0:1:0: [sdc] Mode Sense: 13 00 00 00
sd 2:0:0:0: [sdb] Got wrong page
sd 2:0:1:0: [sdc] Got wrong page
sd 2:0:1:0: [sdc] Assuming drive cache: write through
sd 2:0:0:0: [sdb] Assuming drive cache: write through
sd 2:0:1:0: [sdc] Got wrong page
sd 2:0:1:0: [sdc] Assuming drive cache: write through
 sdc: unknown partition table
sd 2:0:0:0: [sdb] Got wrong page
sd 2:0:1:0: [sdc] Got wrong page
sd 2:0:1:0: [sdc] Assuming drive cache: write through
sd 2:0:1:0: [sdc] Attached SCSI disk
sd 2:0:0:0: [sdb] Assuming drive cache: write through
 sdb: unknown partition table
sd 2:0:0:0: [sdb] Got wrong page
sd 2:0:0:0: [sdb] Assuming drive cache: write through
sd 2:0:0:0: [sdb] Attached SCSI disk

Steps to verify:
on xen-3.0.3-126.el5
1. create 2 blank disks image with qemu-img
2. create a rhel hvm guest with these disks as qemu scsi disk, and then boot.
3. log in the  guest and check dmesg info.

Actual Results:
sd 0:0:0:0: [sda] 16384000 512-byte logical blocks: (8.38 GB/7.81 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1 sda2
sd 0:0:0:0: [sda] Attached SCSI disk
scsi: waiting for bus probes to complete ...
scsi 2:0:0:0: Direct-Access     QEMU     QEMU HARDDISK    0.8. PQ: 0 ANSI: 3
scsi target2:0:0: tagged command queuing enabled, command queue depth 16.
scsi target2:0:0: Beginning Domain Validation
scsi target2:0:0: Domain Validation skipping write tests
scsi target2:0:0: Ending Domain Validation
scsi 2:0:1:0: Direct-Access     QEMU     QEMU HARDDISK    0.8. PQ: 0 ANSI: 3
scsi target2:0:1: tagged command queuing enabled, command queue depth 16.
scsi target2:0:1: Beginning Domain Validation
scsi target2:0:1: Domain Validation skipping write tests
scsi target2:0:1: Ending Domain Validation
sd 2:0:0:0: [sdb] 20480 512-byte logical blocks: (10.4 MB/10.0 MiB)
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Mode Sense: 13 00 00 00
sd 2:0:0:0: [sdb] Got wrong page
sd 2:0:0:0: [sdb] Assuming drive cache: write through
sd 2:0:1:0: [sdc] 40960 512-byte logical blocks: (20.9 MB/20.0 MiB)
sd 2:0:1:0: [sdc] Write Protect is off
sd 2:0:1:0: [sdc] Mode Sense: 13 00 00 00
sd 2:0:1:0: [sdc] Got wrong page
sd 2:0:1:0: [sdc] Assuming drive cache: write through
sd 2:0:0:0: [sdb] Got wrong page
sd 2:0:0:0: [sdb] Assuming drive cache: write through
 sdb: unknown partition table
sd 2:0:1:0: [sdc] Got wrong page
sd 2:0:1:0: [sdc] Assuming drive cache: write through
 sdc:
sd 2:0:0:0: [sdb] Got wrong page
sd 2:0:0:0: [sdb] Assuming drive cache: write through
sd 2:0:0:0: [sdb] Attached SCSI disk
 unknown partition table
sd 2:0:1:0: [sdc] Got wrong page
sd 2:0:1:0: [sdc] Assuming drive cache: write through
sd 2:0:1:0: [sdc] Attached SCSI disk

Comment 13 Tomas Capek 2011-07-13 13:26:20 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
When an HVM guest with several disks emulated as SCSI via the QEMU emulator booted, numerous SCSI inquiry errors were returned. With this update, a patch has been provided to properly handle the varying length of the inquiry commands, and the aforementioned error messages are no longer returned.

Comment 14 errata-xmlrpc 2011-07-21 09:17:10 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1070.html

Comment 15 errata-xmlrpc 2011-07-21 11:58:38 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1070.html


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