Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1793550

Summary: SCSI Hostdev Passthrough: local host disk is passthrough to VM when using other than scsi_generic property.
Product: [oVirt] ovirt-engine Reporter: Nisim Simsolo <nsimsolo>
Component: BLL.VirtAssignee: Tomasz BaraƄski <tbaransk>
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.4.0CC: bugs, lsvaty, nsimsolo, rbarry
Target Milestone: ovirt-4.4.0Keywords: TestBlocker
Target Release: ---Flags: pm-rhel: ovirt-4.4+
pm-rhel: blocker?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: vdsm-4.40.7, ovirt-engine-4.4.0 gitb5b5c99ca2f Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-20 19:59:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1718818    
Attachments:
Description Flags
engine.log
none
vdsm.log
none
VM libvirt log
none
VM dumpxml none

Description Nisim Simsolo 2020-01-21 14:43:54 UTC
Description of problem:
When adding SCSI hostdev to VM with one of the next properties scsi_block, scsi_hd or virtio_blk_pci, the actual disk attached to the VM is the local host hard drive (SCSI device is with same provide/model name and also with the same size of host local HD)
Observing VM domain XML shows that the correct scsi_hostdev property is set on the VM.
An examples of VM and host lsscsi command output (for comparison):
- host lsscsi output: 
[root@intel-vfio vdsm]# lsscsi
[0:0:0:0]    disk    ATA      WDC WD10EZEX-60M 1A03  /dev/sda 
[4:0:0:0]    cd/dvd  hp       DVDRAM GUB0N     SA02  /dev/sr0 
[8:0:0:0]    disk    ATA      SAMSUNG MZHPV256 4H0Q  /dev/sdb <-- this one
[9:0:0:0]    disk    KMNRIO   K2               0000  /dev/sdc 
[9:0:0:18]   disk    KMNRIO   K2               0000  /dev/sdh 
.
.

- VM lsscsi output:
[root@localhost ~]# lsscsi
[1:0:0:0]    cd/dvd  QEMU     QEMU DVD-ROM     2.5+  /dev/sr0 
[7:0:0:0]    disk    QEMU     QEMU HARDDISK    2.5+  /dev/sda 
[11:0:0:225] disk    ATA      SAMSUNG MZHPV256 4H0Q  /dev/sdb <-- this one
[root@localhost ~]# 

When using the same SCSI hostdev but with scsi_generic property, the correct SCSI hostdev is attached to the VM:
[root@localhost ~]# lsscsi
[1:0:0:0]    cd/dvd  QEMU     QEMU DVD-ROM     2.5+  /dev/sr0 
[2:0:0:0]    disk    QEMU     QEMU HARDDISK    2.5+  /dev/sda 
[2:0:0:1]    disk    KMNRIO   K2               0000  /dev/sdb 
[root@localhost ~]# 

Version-Release number of selected component (if applicable):
ovirt-engine-4.4.0-0.14.master.el7
vdsm-4.40.0-180.giteba0b75.el8ev.x86_64
libvirt-5.6.0-6.module+el8.1.0+4244+9aa4e6bb.x86_64
qemu-kvm-4.1.0-14.module+el8.1.0+4548+ed1300f4.x86_64
sanlock-3.8.0-2.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Add SCSI domain to data center with some LUNs on it.
2. Browse WebAdmin -> Compute -> VMs -> click on RHEL VM -> host devices and add SCSI device which is related to the LUNs added in step 1.
3. Edit VM -> Custom properties -> select scsi_hostdev key and scsi_block (or one of the other properties except of scsi_generic)
4. Run VM

Actual results:
VM is running with local host HD attached instead of the SCSI hostdev selected.

Expected results:
VM should run with the correct SCSI hostdev attached.

Additional info:
vdsm.log, engine.log, VM dumpxml and VM libvirt.log file
VM name is rhel7l, and the last state in the logs is with scsi_block property.

Comment 1 Nisim Simsolo 2020-01-21 14:47:39 UTC
Created attachment 1654275 [details]
engine.log

Comment 2 Nisim Simsolo 2020-01-21 14:48:52 UTC
Created attachment 1654277 [details]
vdsm.log

Comment 3 Nisim Simsolo 2020-01-21 14:49:34 UTC
Created attachment 1654278 [details]
VM libvirt log

Comment 4 Nisim Simsolo 2020-01-21 14:50:12 UTC
Created attachment 1654279 [details]
VM dumpxml

Comment 5 RHEL Program Management 2020-01-22 13:58:19 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 6 Nisim Simsolo 2020-04-16 08:28:51 UTC
verification version:
ovirt-engine-4.4.0-0.29.master.el8ev
vdsm-4.40.9-1.el8ev.x86_64
qemu-kvm-4.2.0-17.module+el8.2.0+6131+4e715f3b.x86_64
libvirt-daemon-6.0.0-16.module+el8.2.0+6131+4e715f3b.x86_64
sanlock-3.8.0-2.el8.x86_64

Comment 7 Sandro Bonazzola 2020-05-20 19:59:33 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.