Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1097622 - Inconsistent VirtIO direct lun disk attachment behaviour.
Summary: Inconsistent VirtIO direct lun disk attachment behaviour.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.3.0
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
: 3.5.0
Assignee: Daniel Erez
QA Contact: Ori Gofen
URL:
Whiteboard: storage
Depends On: 1117414
Blocks: 1110687 rhev3.5beta 1156165
TreeView+ depends on / blocked
 
Reported: 2014-05-14 08:08 UTC by Roman Hodain
Modified: 2018-12-06 16:33 UTC (History)
15 users (show)

Fixed In Version: ovirt-engine-3.5.0_beta
Doc Type: Bug Fix
Doc Text:
When running a virtual machine with a DirectLUN disk attached using a VirtIO interface, the Manager now sets the 'device' property to 'lun' so that the 'disk' tag resembles [1], allowing generic SCSI commands from the virtual machine to be properly accepted and passed through to the physical device. Previously, the correct attribute was sent only on hot-plug. [1] <disk type='block' device='lun' snapshot='no'>
Clone Of:
: 1110687 (view as bug list)
Environment:
Last Closed: 2015-02-11 18:01:54 UTC
oVirt Team: Storage
Target Upstream Version:
amureini: Triaged+


Attachments (Terms of Use)
vdsm+engine logs (deleted)
2014-07-29 10:24 UTC, Ori Gofen
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0158 normal SHIPPED_LIVE Important: Red Hat Enterprise Virtualization Manager 3.5.0 2015-02-11 22:38:50 UTC
oVirt gerrit 28843 master MERGED core: set device to "lun" on VmInfoBuilder Never

Description Roman Hodain 2014-05-14 08:08:06 UTC
Description of problem:

	When a direct LUN is connected to a VM before it is booted. The disk is
connected as 
		<disk type='file' device='disk' snapshot='no'>

	Whereas a disk which is hot-plugged is connected in the following way:

		<disk type='block' device='lun' snapshot='no'>

Version-Release number of selected component (if applicable):

	rhevm-3.3.2-0.50

How reproducible:

	100%

Steps to Reproduce:
	1. Create a VM with a direct LUN attached
	2. Start the VM
	3. Check the xml definition (virsh -r <VM_NAME>)
	4. Deactivate the disk
	5. Activate the disk
	6. Check the xml definition

Actual results:
	The outputs are diferent

Expected results:
	The outputs are the same. I assume that the "device=lun" is correct.

Additional info:
	Tested on RHEV 3.4 beta and it behaves in the same way.
	VirtIO-scsi is not affected only VirtIO

Comment 1 Allon Mureinik 2014-05-14 22:11:26 UTC
What's the impact (besides using different XMLs)?

Comment 2 Roman Hodain 2014-05-15 11:18:45 UTC
(In reply to Allon Mureinik from comment #1)
> What's the impact (besides using different XMLs)?

The guest system is not able to get the scsi id of the device for instance if
the device is set to disk.

from libvirt documentation:
	Using "lun" behaves identically to "disk", except that generic SCSI
	commands from the guest are accepted and passed through to the physical
	device.

Comment 3 Xavi Francisco 2014-05-22 09:32:19 UTC
I was not able to reproduce the problem. In the case of hotplugging the disk, it's true that the device is set to LUN but no scsi information is accessible because it's treated as a VirtIO vdX device. When you use the virtio-scsi driver the guest receives the scsi information correctly.

Can you please attach the logs to see if you have something different?

Comment 4 Roman Hodain 2014-05-23 08:46:03 UTC
(In reply to Xavi Francisco from comment #3)
> I was not able to reproduce the problem. In the case of hotplugging the
> disk, it's true that the device is set to LUN but no scsi information is
> accessible because it's treated as a VirtIO vdX device. When you use the
> virtio-scsi driver the guest receives the scsi information correctly.
> 
> Can you please attach the logs to see if you have something different?

Yes, but even VirtIO block is able to pass scsi commands. Here is my example when I use iSCSI target and VirtIO block with LUN.

# scsi_id --page=0x83 --device=/dev/vda --whitelist
1IET    00010001

The same command with VirtIO block without LUN does not return anything. I can attach logs is needed. But you should be able to reproduce by this command.

Comment 7 Ori Gofen 2014-07-29 07:34:26 UTC
bug reproduced on beta.2,the disk data has changed,but still very unclear and confusing

vdsm version vdsm-4.16.0-42.git3bfad86.el6.x86_64

lun inactive: 

<disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source startupPolicy='optional'/>

lun active:

 <disk type='block' device='lun' snapshot='no'>
      <driver name='qemu' type='raw' cache='none' error_policy='stop' io='native'/>
      <source dev='/dev/mapper/360060160f4a03000fc65675991dbe311'/>

Comment 8 Allon Mureinik 2014-07-29 08:50:28 UTC
Why are you testing this with the CD-ROM?

Comment 9 Ori Gofen 2014-07-29 10:24:27 UTC
Created attachment 922101 [details]
vdsm+engine logs

the bug reproduced via "steps to reproduce"

logs attached as asked

Comment 10 Daniel Erez 2014-08-04 08:54:58 UTC
Hi Ori,

The cdrom device is being sent by default upon running a VM (so it shouldn't be related to the lun device). According to the attached logs [1], on hot-plugging 
a direct LUN disk, the disk tag gets 'device="lun"' - as it should. Now, it should be verified that same happens on run VM; I couldn't find in the attached logs the VM xml output with the active lun disk. Can you please verify that same result is achieved in this case? 

[1]
Thread-54::DEBUG::2014-07-29 13:22:53,427::vm::3841::vm.Vm::(hotunplugDisk) vmId=`bc504a24-7eba-4a78-8ff0-85f16cf4e5f2`::Hotunplug disk xml:
<disk device="lun" snapshot="no" type="block">
	<address bus="0x00" domain="0x0000" function="0x0" slot="0x07" type="pci"/>
	<source dev="/dev/mapper/360060160f4a03000fb65675991dbe311"/>
	<target bus="virtio" dev="vdc"/>
	<serial></serial>
	<driver cache="none" error_policy="stop" io="native" name="qemu" type="raw"/>
</disk>

Comment 11 Ori Gofen 2014-08-07 11:47:55 UTC
verified on rc1 build

Comment 12 Tal Nisan 2014-11-26 11:28:08 UTC
Please supply doc text

Comment 14 errata-xmlrpc 2015-02-11 18:01:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

https://rhn.redhat.com/errata/RHSA-2015-0158.html


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