Bug 864845

Summary: QEMU should not allow to add the ability to set a <wwn> for scsi-block
Product: Red Hat Enterprise Linux 6 Reporter: Sibiao Luo <sluo>
Component: qemu-kvmAssignee: Paolo Bonzini <pbonzini>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: acathrow, areis, bsarathy, chayang, dyasny, juzhang, michen, mkenneth, pbonzini, qzhang, sluo, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-15 14:28:16 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:

Description Sibiao Luo 2012-10-10 09:04:44 UTC
Description of problem:
this issue was separate from Bug 831102. QEMU just allow to set new element <wwn> (just like setting serial number) for the virtual disk (scsi-disk, scsi-hd, and scsi-cd). But there is a new element <wwn> property for scsi-block and boot guest with setting the wwn to scsi-block successfully, this will confuse users.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm
2.6.32-325.el6.x86_64
qemu-kvm-0.12.1.2-2.320.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
- scenario 1:
# /usr/libexec/qemu-kvm -device scsi-block,?
scsi-block.drive=drive
scsi-block.logical_block_size=uint16
scsi-block.physical_block_size=uint16
scsi-block.min_io_size=uint16
scsi-block.opt_io_size=uint32
scsi-block.bootindex=int32
scsi-block.discard_granularity=uint32
scsi-block.ver=string
scsi-block.serial=string
scsi-block.wwn=hex64
scsi-block.channel=uint32
scsi-block.scsi-id=uint32
scsi-block.lun=uint32

- scenario 2:
1.boot a guest with setting wwn to scsi-block.
eg:...-drive file=/dev/sdb,if=none,id=hd,format=raw,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi0 -device scsi-block,bus=scsi0.0,wwn=0x5000c50015ea71ad,drive=hd,id=sluo
2.check the device identification in guest.
# ls -l /dev/disk/by-id/*
# sg_inq -p 0x83 /dev/sda (or sg_vpd)

Actual results:
- scenario 1: 
there is a new element <wwn> property for scsi-block, like: scsi-block.wwn=hex64.

- scenario 2: 
1.after the step 1, it can boot up guest successfully.
2.after the step 2,
# ls -l /dev/disk/by-id/wwn-*
lrwxrwxrwx. 1 root root 9 Oct 10 16:35 /dev/disk/by-id/wwn-0x6090a038d0f771093d078568b249ff1d -> ../../sda
# sg_inq -p 0x83 /dev/sda 
VPD INQUIRY: Device Identification page
  Designation descriptor number 1, descriptor length: 20
    designator_type: NAA,  code_set: Binary
    associated with the addressed logical unit
      NAA 6, IEEE Company_id: 0x90a03
      Vendor Specific Identifier: 0x8d0f77109
      Vendor Specific Identifier Extension: 0x3d078568b249ff1d
      [0x6090a038d0f771093d078568b249ff1d]
  Designation descriptor number 2, descriptor length: 8
    designator_type: Relative target port,  code_set: Binary
    associated with the target port
      Relative target port: 0x1
  Designation descriptor number 3, descriptor length: 8
    designator_type: Target port group,  code_set: Binary
    associated with the target port
      Target port group: 0x1
  Designation descriptor number 4, descriptor length: 20
    designator_type: vendor specific [0x0],  code_set: Binary
    associated with the addressed logical unit
 00     01 00 00 00 0d a8 48 e2  00 00 01 2e 00 00 00 00    ......H.........

Expected results:
- scenario 1:
there should be no element <wwn> property for scsi-block.
- scenario 2: 
fail to boot guest and QEMU should give some prompt, like: 
Setting wwn for scsi-block is not supported by QEMU.

Additional info:

Comment 3 Paolo Bonzini 2012-10-15 14:28:16 UTC
Bug 831102 failed QA (my fault), so I'll just post a followup using that bug.

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