Red Hat Bugzilla – Bug 1250363
HostDeviceManager allocates devices on unrelated hosts
Last modified: 2016-02-23 04:02:06 EST
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):
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
More than the host_device (belonging to the VM's pinned host) has the vm_id set
to that of the running VM.
Only host devices belonging to VM's (unique) pinned host should be marked with vm_id.
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)