9ea340eb0d
Somewhere in the past release, we started using extremely complex code paths involving sharing providers, anchor providers, and nested resource provider calculations when we absolutely don't need to do so. There was a _has_provider_trees() function in the nova/api/openstack/placement/objects/resource_provider.py file that used to be used for top-level switching between a faster, simpler approach to finding allocation candidates for a simple search of resources and traits when no sharing providers and no nesting was used. That was removed at some point and all code paths -- even for simple "get me these amounts of these resources" when no trees or sharing providers are present (which is the vast majority of OpenStack deployments) -- were going through the complex tree-search-and-match queries and algorithms. This patch changes that so that when there's a request for some resources and there's no trees or sharing providers, we do the simple code path. Hopefully this gets our performance for the simple, common cases back to where we were pre-Rocky. This change is a prerequisite for the following change which adds debugging output to help diagnose which resource classes are running out of inventory when GET /allocation_candidates returns 0 results. That code is not possible without the changes here as they only work if we can identify when a "simpler approach" is possible and call that simpler code. Related-Bug: #1786055 Partial-Bug: #1786519 Change-Id: I1fdbcdb7a1dd51e738924c8a30238237d7ac74e1 |
||
---|---|---|
.. | ||
__init__.py | ||
consumer.py | ||
project.py | ||
resource_provider.py | ||
user.py |