yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #95561
[Bug 2098496] Re: VM gets more PCI hostdevs than requested when PCI in Placement is enabled with VFs
Reviewed: https://review.opendev.org/c/openstack/nova/+/944277
Committed: https://opendev.org/openstack/nova/commit/229fb3513ae39fa120167107afe42568ca85ace9
Submitter: "Zuul (22348)"
Branch: master
commit 229fb3513ae39fa120167107afe42568ca85ace9
Author: Balazs Gibizer <gibi@xxxxxxxxxx>
Date: Thu Mar 13 16:24:27 2025 +0100
Ignore metadata tags in pci/stats _find_pool logic
The stats module uses the _find_pool() call to find a matching pool for
a new device or a device that is being deallocated. If no existing pool
matches with the dev then then a new pool is created for it. The
pool matching logic was faulty as it did not remove all the metadata
keys from the pool like rp_uuid. So if the dev did not have that key but
the pool did then the dev did not match.
On the other hand the PCI allocation logic (when PCI in Placement is
enabled) assumed that devices from a single rp_uuid are always in a
single pool. As this assumption was broken by the above bug the PCI
allocation blindly tried to allocate resources for an rp_uuid from each
matching pool causing overallocation.
The main fix in this patch is to ignore the metadata tags in
_find_pool(). But also two safety net are added to the allocation logic.
The logic now asserts that the assumption is correct and if not (i.e. it
found multiple pools with the same rp_uuid) then it bails out. It also
does not ever blindly allocate the same rp_uuid request from multiple
pools.
Closes-Bug: #2098496
Change-Id: I9678230397fa1a3c735ee01ed756d5af3b4e1191
** Changed in: nova
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/2098496
Title:
VM gets more PCI hostdevs than requested when PCI in Placement is
enabled with VFs
Status in OpenStack Compute (nova):
Fix Released
Bug description:
Reproduce:
* create devstack from recent master with device_spec config enabling multiple VFs per PF
* enable pci in placement feature
* create VM with a flavor requesting a single VF
* observe the the VM got a single hostdev
* delete the VM
* observer that the device the VM was using is freed
* create another VM with the same flavor requesting a single VF
Expected:
The VM gets a single hostdev
Actual:
The VM gets two hostdevs and it has two devices allocated both in the nova DB and in placement
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/2098496/+subscriptions
References