Comment 24 for bug 1737465

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (stable/stein)

Reviewed: https://review.opendev.org/676257
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=677c95280b21eb6628a7758f173cb98c4e3572c2
Submitter: Zuul
Branch: stable/stein

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)