Bug 1465456

Summary: Hot-plugged SCSI-Virtio disk does not receive controlled with correct IO thread
Product: [oVirt] ovirt-engine Reporter: Artyom <alukiano>
Component: BLL.VirtAssignee: Michal Skrivanek <michal.skrivanek>
Status: CLOSED WONTFIX QA Contact: meital avital <mavital>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.1.3.2CC: amureini, bugs, derez, tjelinek, tnisan
Target Milestone: ---Flags: sbonazzo: ovirt-4.3-
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-28 06:38:13 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:
Attachments:
Description Flags
engine and vdsm log none

Description Artyom 2017-06-27 13:16:10 UTC
Created attachment 1292330 [details]
engine and vdsm log

Description of problem:


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


How reproducible:
Always

Steps to Reproduce:
1. Create VM with one SCSI-Virtio disk and 2 IO threads
2. Start the VM
<devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source startupPolicy='optional'/>
      <backingStore/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <alias name='ide0-1-0'/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk' snapshot='no'>
      <driver name='qemu' type='raw' cache='none' error_policy='stop' io='threads'/>
      <source file='/rhev/data-center/00000001-0001-0001-0001-000000000311/02ee81e8-c25b-4882-9324-a78793ece745/images/1c453cc3-6e02-4598-bfa6-082bd364daef/3bd1b7d5-cfad-429e-beec-e7e5a8edce60'/>
      <backingStore/>
      <target dev='sda' bus='scsi'/>
      <serial>1c453cc3-6e02-4598-bfa6-082bd364daef</serial>
      <boot order='1'/>
      <alias name='scsi0-0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0' model='piix3-uhci'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='scsi' index='0' model='virtio-scsi'>
      <driver iothread='1'/>
      <alias name='scsi0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <controller type='scsi' index='1' model='virtio-scsi'>
      <driver iothread='2'/>
      <alias name='scsi1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </controller>
...
3. Hotplug additional SCSI-Virtio disk to VM
<devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source startupPolicy='optional'/>
      <backingStore/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <alias name='ide0-1-0'/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk' snapshot='no'>
      <driver name='qemu' type='raw' cache='none' error_policy='stop' io='threads'/>
      <source file='/rhev/data-center/00000001-0001-0001-0001-000000000311/02ee81e8-c25b-4882-9324-a78793ece745/images/1c453cc3-6e02-4598-bfa6-082bd364daef/3bd1b7d5-cfad-429e-beec-e7e5a8edce60'/>
      <backingStore/>
      <target dev='sda' bus='scsi'/>
      <serial>1c453cc3-6e02-4598-bfa6-082bd364daef</serial>
      <boot order='1'/>
      <alias name='scsi0-0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk' snapshot='no'>
      <driver name='qemu' type='raw' cache='none' error_policy='stop' io='threads'/>
      <source file='/rhev/data-center/00000001-0001-0001-0001-000000000311/02ee81e8-c25b-4882-9324-a78793ece745/images/85465f18-159f-4e69-bda0-0fe9b768a12b/a8ac4c4f-700f-4943-bb56-2320db71a3e3'/>
      <backingStore/>
      <target dev='sdb' bus='scsi'/>
      <serial>85465f18-159f-4e69-bda0-0fe9b768a12b</serial>
      <alias name='scsi0-0-0-2'/>
      <address type='drive' controller='0' bus='0' target='0' unit='2'/>
    </disk>
    <controller type='usb' index='0' model='piix3-uhci'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='scsi' index='0' model='virtio-scsi'>
      <driver iothread='1'/>
      <alias name='scsi0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <controller type='scsi' index='1' model='virtio-scsi'>
      <driver iothread='2'/>
      <alias name='scsi1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </controller>
...

Actual results:
Hot-plugged disk has controller with the same IO thread as the first disk

Expected results:
Hot-plugged disk must have controller with different IO thread(sure I talk only about cases when number_of_iothreads > number of disks)

Additional info:

Comment 1 Artyom 2017-06-27 13:17:29 UTC
Versions:
rhevm-4.1.3.2-0.1.el7.noarch
vdsm-4.19.19-1.el7ev.x86_64

Comment 2 Michal Skrivanek 2017-06-28 05:39:19 UTC
doesn't sound like an interesting use case. We do a simple round robin....when ou start doing hot plugs it's no longer simple. 
On top of that - performance improvements for more iothreads seem to be negligent.
WONTFIX?

Comment 3 Yaniv Kaul 2017-06-28 06:38:13 UTC
(In reply to Michal Skrivanek from comment #2)
> doesn't sound like an interesting use case. We do a simple round
> robin....when ou start doing hot plugs it's no longer simple. 
> On top of that - performance improvements for more iothreads seem to be
> negligent.
> WONTFIX?

Yes.