Bug 1250363 - HostDeviceManager allocates devices on unrelated hosts
HostDeviceManager allocates devices on unrelated hosts
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:
  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:
Last Closed: 2016-02-23 04:02:06 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
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):

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

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.