nova/nova/tests/unit/scheduler
Matt Riedemann 677c95280b 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 3a69fdb333)
2019-08-13 13:38:14 -04:00
..
client Change a log level for overwriting allocation 2019-04-16 13:34:47 +00:00
filters Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
weights Per aggregate scheduling weight 2019-01-21 11:48:44 +08:00
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
fakes.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
ironic_fakes.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_filter_scheduler.py Fix WeighedHost logging regression 2019-03-05 17:16:23 -05:00
test_filters.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_host_filters.py Modify left filters for RequestSpec 2015-12-11 12:27:20 +01:00
test_host_manager.py Cache host to cell mapping in HostManager 2019-08-13 13:38:14 -04:00
test_request_filter.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_rpcapi.py Use long_rpc_timeout in select_destinations RPC call 2018-11-20 09:03:53 -05:00
test_scheduler.py Remove the CachingScheduler 2018-10-18 17:55:36 -04:00
test_scheduler_utils.py Transform compute_task notifications 2018-11-21 16:23:28 +09:00
test_utils.py Disable limit if affinity(anti)/same(different)host is requested 2019-05-22 14:30:57 -04:00