This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1250363 - HostDeviceManager allocates devices on unrelated hosts
HostDeviceManager allocates devices on unrelated hosts
Status: CLOSED CURRENTRELEASE
Product: ovirt-engine
Classification: oVirt
Component: General (Show other bugs)
---
Unspecified Unspecified
medium Severity medium (vote)
: ovirt-3.6.0-rc
: 3.6.0
Assigned To: Martin Betak
Nisim Simsolo
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-05 04:51 EDT by Martin Betak
Modified: 2016-02-23 04:02 EST (History)
9 users (show)

See Also:
Fixed In Version: 3.6.0-10
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-23 04:02:06 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Virt
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑3.6.0+
ylavi: planning_ack+
rule-engine: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 44364 master MERGED backend: Fix incorrect allocation of Host Devices Never
oVirt gerrit 44404 ovirt-engine-3.6 MERGED backend: Fix incorrect allocation of Host Devices Never

  None (edit)
Description Martin Betak 2015-08-05 04:51:23 EDT
Description of problem:

MarkHostDevicesUsedByVmId stored procedure (invoked by HostDeviceManager) looked only on device name when marking the appropriate host devices in DB. This could potentially result (when having device of same name on more than 1 host) in additional allocation of unrelated host devices with given name on all hosts.

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

How reproducible:
Difficult. Have to have pass-through-able devices on at least two hosts with the same device_name.

Steps to Reproduce:
1. Configure host device with given name for a VM
2. Run the VM (should run successfully)
3. check host_device table in DB which host devices have set vm_id to that of the running VM

Actual results:
More than the host_device (belonging to the VM's pinned host) has the vm_id set
to that of the running VM.

Expected results:
Only host devices belonging to VM's (unique) pinned host should be marked with vm_id.
Comment 1 Nisim Simsolo 2016-02-22 09:44:56 EST
Verified: 
rhevm-3.6.3.2-0.1.el6
libvirt-client-1.2.17-13.el7_2.2.x86_64
vdsm-4.17.21-0.el7ev.noarch
qemu-kvm-rhev-2.3.0-31.el7_2.4.x86_64
sanlock-3.2.4-1.el7.x86_64

Verification scenario:
1. Use 2 hosts that support passthrough.
2. Browse webadmin --> hosts tab --> select host --> host devices tab, find PCI device with an equal name to the second host PCI name (for example pci_0003_03_00_0).
3. Attach the first host PCI device to VM and run VM.
4. Verify VM is running with PCI device attached.
5. Observe engine DB --> host_device table, verify that this device only is allocated to the first host only (actually the verification is to validate that identical PCI ID is not attached to the second host also because of the name duplication)

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