[openstack-dev] [nova] [placement] compute nodes use of placement
Jay Pipes
jaypipes at gmail.com
Mon Jul 30 18:13:28 UTC 2018
On 07/26/2018 12:15 PM, Chris Dent wrote:
> The `in_tree` calls happen from the report client method
> `_get_providers_in_tree` which is called by
> `_ensure_resource_provider` which can be called from multiple
> places, but in this case is being called both times from
> `get_provider_tree_and_ensure_root`, which is also responsible for
> two of the inventory request.
>
> `get_provider_tree_and_ensure_root` is called by `_update` in the
> resource tracker.
>
> `_update` is called by both `_init_compute_node` and
> `_update_available_resource`. Every single period job iteration.
> `_init_compute_node` is called from _update_available_resource`
> itself.
>
> That accounts for the overall doubling.
Actually, no. What accounts for the overall doubling is the fact that we
no longer short-circuit return from _update() when there are no known
changes in the node's resources.
We *used* to do a quick check of whether the resource tracker's local
cache of resources had been changed, and just exit _update() if no
changes were detected. However, this patch modified that so that we
*always* call to get inventory, even if the resource tracker noticed no
changes in resources:
https://github.com/openstack/nova/commit/e2a18a37190e4c7b7697a8811553d331e208182c
The reason for that change is because the virt driver was tracking vGPU
resources now and those vGPU resources were not tracked by the resource
tracker's local cache of resources.
Thus, we now always call the virt driver get_inventory() call (which
morphed into the virt driver's update_provider_tree() call, but the
change to update_provider_tree() didn't actually increase the number of
calls to get inventories. It was the patch above that did that.
Best,
-jay
More information about the OpenStack-dev
mailing list