Bug 1366507

Summary: [RFE] Enable virtio-scsi dataplane for el7.3
Product: [oVirt] ovirt-engine Reporter: Michal Skrivanek <michal.skrivanek>
Component: BLL.VirtAssignee: Shahar Havivi <shavivi>
Status: CLOSED CURRENTRELEASE QA Contact: Israel Pinto <ipinto>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.0.0CC: bugs, ipinto, tjelinek
Target Milestone: ovirt-4.1.2Keywords: FutureFeature
Target Release: 4.1.2.1Flags: michal.skrivanek: ovirt-4.1?
ipinto: testing_plan_complete+
michal.skrivanek: planning_ack?
rule-engine: devel_ack+
rule-engine: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-23 08:19:00 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: 1086313, 1286709, 1422450    
Bug Blocks:    

Description Michal Skrivanek 2016-08-12 07:20:40 UTC
Similarly to virtio-blk dataplane we can now enable iothreads for virtio-scsi

Comment 1 Michal Skrivanek 2016-09-30 07:24:59 UTC
additionally needs controller configuration and pinning to a controller, unlike virtio-blk

Comment 2 Sandro Bonazzola 2016-12-12 14:00:12 UTC
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified.

Comment 3 Tomas Jelinek 2017-01-09 07:58:24 UTC
Please note that what is included in "oVirt 4.1.0 beta 1" only supports one virtio scsi controller (e.g. all the disks are attached to the first IO Thread regardless of how many IO Threads are configured).

https://gerrit.ovirt.org/#/c/67280/ adds support to round-robin over the controllers. But I think it does have value to test this RFE already since the crucial part is if the whole stack works together.

Comment 4 Israel Pinto 2017-03-09 15:21:22 UTC
Verify it with: 
Red Hat Virtualization Manager Version: 4.1.1.3-0.1.el7

Steps:
1. Create VM with 1 disk on ISCSI and set the IO Threads to 1.
2. Run VM and check VM xml

Results 
The IOThread don't send in the create VM command in first time (from engine to VDSM)
After re-edit VM and rerun it, IO thread send to VDSM and libvirt not set it.
Verify it with Tomas Jelinek.

Also when setting more then 1 IOthread the threads are not set,
see BZ:https://bugzilla.redhat.com/show_bug.cgi?id=1422450

So The build is failed QA

Comment 5 Red Hat Bugzilla Rules Engine 2017-03-09 15:21:28 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 6 Israel Pinto 2017-05-09 08:37:52 UTC
Verify with:
Red Hat Virtualization Manager Version: 4.1.2.1-0.1.el7
OS Version:RHEL - 7.3 - 7.el7
Kernel Version:3.10.0 - 514.16.1.el7.x86_64
KVM Version:2.6.0 - 28.el7_3.9
LIBVIRT Version:libvirt-2.0.0-10.el7_3.5
VDSM Version:vdsm-4.19.12-1.el7ev
Cases:
CASE 1:
VM configuration: VM with 1 disk ISCSI and 1 io threads
<domain xmlns:ovirt="http://ovirt.org/vm/tune/1.0" type="kvm">
    <name>data_plan_1_disk_1_iothread</name>
    <uuid>23678104-0188-4387-a596-65d26b7b4c92</uuid>
    <iothreads>1</iothreads>
    <devices>
        <controller index="0" model="virtio-scsi" type="scsi">
            <driver iothread="1" />
        </controller>
        <controller index="0" ports="16" type="virtio-serial" />
        <disk device="disk" snapshot="no" type="block">
            <source dev="/rhev/data-center/7550d189-d97d-43d6-929f-611db2ae4e17/5449c95e-b387-4d19-8f58-a22000608f3c/images/bdaf8d6a-b7ac-4c93-897f-c2e9536a0bba/3f91ac02-37f7-4763-8790-be3514a1c8f8" />
            <target bus="virtio" dev="vda" />
            <serial>bdaf8d6a-b7ac-4c93-897f-c2e9536a0bba</serial>
            <driver cache="none" error_policy="stop" io="native" iothread="1" name="qemu" type="qcow2" />
        </disk>
    </devices>
</domain>
Result : PASS
1 controller with 1 thread 
on Disk 1 iothread is set
---------------
CASE 2:
VM configuration: VM with 2 disk on ISCSI and 2 iothreads
<domain xmlns:ovirt="http://ovirt.org/vm/tune/1.0" type="kvm">
    <name>data_plane_2_disk_2_io</name>
    <uuid>ddd98f4a-a42f-4151-b47e-ff8c5a025d8c</uuid>
    <iothreads>2</iothreads>
    <devices>
        <controller index="0" model="virtio-scsi" type="scsi">
            <driver iothread="1" />
        </controller>
        <controller index="1" model="virtio-scsi" type="scsi">
            <driver iothread="2" />
        </controller>
        <controller index="0" ports="16" type="virtio-serial">
            <address bus="0x00" domain="0x0000" function="0x0" slot="0x06" type="pci" />
        </controller>
        <disk device="disk" snapshot="no" type="block">
            <address bus="0" controller="0" target="0" type="drive" unit="0" />
            <source dev="/rhev/data-center/7550d189-d97d-43d6-929f-611db2ae4e17/5449c95e-b387-4d19-8f58-a22000608f3c/images/17ace1a2-3e35-42d0-bf65-fdc8ef67c50c/2f9c699a-6805-4305-a25f-ba2f79b50261" />
            <target bus="scsi" dev="sda" />
            <serial>17ace1a2-3e35-42d0-bf65-fdc8ef67c50c</serial>
            <boot order="1" />
            <driver cache="none" error_policy="stop" io="native" name="qemu" type="raw" />
        </disk>
        <disk device="disk" snapshot="no" type="block">
            <address bus="0x00" domain="0x0000" function="0x0" slot="0x07" type="pci" />
            <source dev="/rhev/data-center/7550d189-d97d-43d6-929f-611db2ae4e17/5449c95e-b387-4d19-8f58-a22000608f3c/images/9630a53a-8d1c-4ba5-ab65-10864959b0ad/0c15e4ee-7d33-4d17-8375-7607bb5a083d" />
            <target bus="virtio" dev="vda" />
            <serial>9630a53a-8d1c-4ba5-ab65-10864959b0ad</serial>
            <driver cache="none" error_policy="stop" io="native" iothread="1" name="qemu" type="qcow2" />
        </disk>
    </devices>
</domain>
Result: PASS
2 controllers each on with one thread
---------------------------
CASE 3:
VM configuration: Vm with 2 disk: 1 ISCSI and 1 NFS, 2 IO Threads
<domain xmlns:ovirt="http://ovirt.org/vm/tune/1.0" type="kvm">
    <name>data_plan_1_iscsi_1_nfs_1_thread</name>
    <uuid>8792f143-5da0-4406-9eb9-90a243c524d6</uuid>
    <iothreads>2</iothreads>
    <devices>
        <controller index="0" model="virtio-scsi" type="scsi">
            <driver iothread="1" />
        </controller>
        <controller index="1" model="virtio-scsi" type="scsi">
            <driver iothread="2" />
        </controller>
        <controller index="0" ports="16" type="virtio-serial" />
        <video>
            <model heads="1" ram="65536" type="qxl" vgamem="16384" vram="32768" />
        </video>
        <disk device="disk" snapshot="no" type="block">
            <source dev="/rhev/data-center/7550d189-d97d-43d6-929f-611db2ae4e17/5449c95e-b387-4d19-8f58-a22000608f3c/images/59384f5e-c457-446b-ad0a-f07ba93c5a0b/59b86c89-e319-4c92-a991-346434595efe" />
            <target bus="virtio" dev="vda" />
            <serial>59384f5e-c457-446b-ad0a-f07ba93c5a0b</serial>
            <boot order="1" />
            <driver cache="none" error_policy="stop" io="native" iothread="1" name="qemu" type="qcow2" />
        </disk>
        <disk device="disk" snapshot="no" type="file">
            <address bus="0" controller="0" target="0" type="drive" unit="0" />
            <source file="/rhev/data-center/7550d189-d97d-43d6-929f-611db2ae4e17/87e7d023-7452-44a4-be54-9ff029292a83/images/54ac6602-89ca-40d9-8053-550ff932cdf8/ee6f0b21-5fc9-4c43-9844-1dd4e305ba0f" />
            <target bus="scsi" dev="sda" />
            <serial>54ac6602-89ca-40d9-8053-550ff932cdf8</serial>
            <driver cache="none" error_policy="stop" io="threads" name="qemu" type="raw" />
        </disk>        
    </devices>
</domain>
Result: PASS
2 controllers each on with one thread
On the disks i see diff behavior:
-------------------------
CASE 4 (regression): 
VM with 2 NFS disks and 2 IO Threads
<domain xmlns:ovirt="http://ovirt.org/vm/tune/1.0" type="kvm">
    <name>data_2_NFS_2_iothread</name>
    <uuid>843c9e5b-fdcb-4947-a8e5-8f0123e30d43</uuid>
    <iothreads>2</iothreads>
    <devices>
        <controller index="0" model="virtio-scsi" type="scsi">
            <driver iothread="1" />
        </controller>
        <controller index="1" model="virtio-scsi" type="scsi">
            <driver iothread="2" />
        </controller>
        <disk device="disk" snapshot="no" type="file">
            <address bus="0" controller="0" target="0" type="drive" unit="0" />
            <source file="/rhev/data-center/7550d189-d97d-43d6-929f-611db2ae4e17/87e7d023-7452-44a4-be54-9ff029292a83/images/186f357a-67a2-4259-983a-9664f9d0ffa8/9eb384f2-169a-44d2-af67-ff96156b80c5" />
            <target bus="scsi" dev="sda" />
            <serial>186f357a-67a2-4259-983a-9664f9d0ffa8</serial>
            <boot order="1" />
            <driver cache="none" error_policy="stop" io="threads" name="qemu" type="raw" />
        </disk>
        <disk device="disk" snapshot="no" type="file">
            <address bus="0" controller="0" target="0" type="drive" unit="1" />
            <source file="/rhev/data-center/7550d189-d97d-43d6-929f-611db2ae4e17/87e7d023-7452-44a4-be54-9ff029292a83/images/9cf246d2-152f-4adf-8878-bcb9d233ad9b/4392c52d-faaa-431d-9150-661e75ecc99f" />
            <target bus="scsi" dev="sdb" />
            <serial>9cf246d2-152f-4adf-8878-bcb9d233ad9b</serial>
            <driver cache="none" error_policy="stop" io="threads" name="qemu" type="raw" />
        </disk>
    </devices>    
</domain> 

Result: PASS
2 controllers each on with one thread