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)
Reviewed: https:/ /review. opendev. org/694408 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=e2b4e3346e2 0615473328e7ae9 0b5083500961ca
Committed: https:/
Submitter: Zuul
Branch: stable/train
commit e2b4e3346e20615 473328e7ae90b50 83500961ca
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 Ifc7dcde8a65971 0acecb1967da15c 632c69d675c
by joining the Migration.instance migration_context and
flavor to avoid lazy-loading those later.
When tracking an incoming migration, the ResourceTracker instances_ to_migrations can hit a KeyError since it's usage_from_ migrations will lazy-load the Migration.instance
_pair_
not yet tracking the instance on that dest host yet. Then
_update_
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: I613ad054f77b1a 0a9d2e7718c0c53 1d11525283c ddebb4b39475a6b f03ec5908b)
Related-Bug: #1540526
(cherry picked from commit c15e36e5849b6ba