Comment 25 for bug 1540526

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

Reviewed: https://review.opendev.org/694408
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=e2b4e3346e20615473328e7ae90b5083500961ca
Submitter: Zuul
Branch: stable/train

commit e2b4e3346e20615473328e7ae90b5083500961ca
Author: Matt Riedemann <email address hidden>
Date: Mon Oct 21 13:00:59 2019 -0400

    Join migration_context and flavor in Migration.instance

    This builds on Ifc7dcde8a659710acecb1967da15c632c69d675c
    by joining the Migration.instance migration_context and
    flavor to avoid lazy-loading those later.

    When tracking an incoming migration, the ResourceTracker
    _pair_instances_to_migrations can hit a KeyError since it's
    not yet tracking the instance on that dest host yet. Then
    _update_usage_from_migrations will lazy-load the Migration.instance
    field and access the migration_context and flavor fields on the
    instance, which get lazy-loaded, which kind of defeats part of
    the purpose of that optimization.

    Change-Id: I613ad054f77b1a0a9d2e7718c0c531d11525283c
    Related-Bug: #1540526
    (cherry picked from commit c15e36e5849b6baddebb4b39475a6bf03ec5908b)