commit 677c95280b21eb6628a7758f173cb98c4e3572c2
Author: Matt Riedemann <email address hidden>
Date: Wed Jun 5 13:30:25 2019 -0400
Cache host to cell mapping in HostManager
If the instances per host are not cached in the HostManager
we lookup the HostMapping per candidate compute node during
each scheduling request to get the CellMapping so we can target
that cell database to pull the instance uuids on the given host.
For example, if placement returned 20 compute node allocation
candidates and we don't have the instances cached for any of those,
we'll do 20 queries to the API DB to get host mappings.
We can improve this by caching the host to cell uuid after the first
lookup for a given host and then after that, get the CellMapping
from the cells cache (which is a dict, keyed by cell uuid, to the
CellMapping for that cell).
Change-Id: Ic6b1edfad2e384eb32c6942edc522ee301123cbc
Related-Bug: #1737465
(cherry picked from commit 3a69fdb333e80f5ad2e025a9823b11483fad55c2)
Reviewed: https:/ /review. opendev. org/676257 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=677c95280b2 1eb6628a7758f17 3cb98c4e3572c2
Committed: https:/
Submitter: Zuul
Branch: stable/stein
commit 677c95280b21eb6 628a7758f173cb9 8c4e3572c2
Author: Matt Riedemann <email address hidden>
Date: Wed Jun 5 13:30:25 2019 -0400
Cache host to cell mapping in HostManager
If the instances per host are not cached in the HostManager
we lookup the HostMapping per candidate compute node during
each scheduling request to get the CellMapping so we can target
that cell database to pull the instance uuids on the given host.
For example, if placement returned 20 compute node allocation
candidates and we don't have the instances cached for any of those,
we'll do 20 queries to the API DB to get host mappings.
We can improve this by caching the host to cell uuid after the first
lookup for a given host and then after that, get the CellMapping
from the cells cache (which is a dict, keyed by cell uuid, to the
CellMapping for that cell).
Change-Id: Ic6b1edfad2e384 eb32c6942edc522 ee301123cbc ad2e025a9823b11 483fad55c2)
Related-Bug: #1737465
(cherry picked from commit 3a69fdb333e80f5