commit d70d02f4af78ec9026cf172b8bcd11b7c451f17c
Author: Matt Riedemann <email address hidden>
Date: Mon Nov 28 17:07:51 2016 -0500
Pre-load info_cache when handling external events and handle NotFound
Before change a5b920a197c70d2ae08a1e1335d979857f923b4f we'd join the
info_cache column when getting the instance in the API. Without
joining the info_cache column when getting the instance, that has
to be lazy-loaded on the compute when processing an external
neutron event, like network-vif-deleted. So this change pre-loads
the info_cache in the API again as an optimization.
There is also a race to contend with here when deleting an instance.
Neutron can send the network-vif-deleted event after we've already
marked the instance as deleted in the database, at which point
lazy-loading info_cache (or updating InstanceInfoCache for that
matter), can result in an Instance(InfoCache)NotFound error, so this
change handles that also.
Change-Id: Ia3b4288691b392d56324e9d13c92e8e0b0d81e76
Closes-Bug: #1645464
(cherry picked from commit 4fce45f83bd510202fd1cbcdb7694361c41e9400)
Reviewed: https:/ /review. openstack. org/427732 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=d70d02f4af7 8ec9026cf172b8b cd11b7c451f17c
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit d70d02f4af78ec9 026cf172b8bcd11 b7c451f17c
Author: Matt Riedemann <email address hidden>
Date: Mon Nov 28 17:07:51 2016 -0500
Pre-load info_cache when handling external events and handle NotFound
Before change a5b920a197c70d2 ae08a1e1335d979 857f923b4f we'd join the vif-deleted. So this change pre-loads
info_cache column when getting the instance in the API. Without
joining the info_cache column when getting the instance, that has
to be lazy-loaded on the compute when processing an external
neutron event, like network-
the info_cache in the API again as an optimization.
There is also a race to contend with here when deleting an instance. InfoCache) NotFound error, so this
Neutron can send the network-vif-deleted event after we've already
marked the instance as deleted in the database, at which point
lazy-loading info_cache (or updating InstanceInfoCache for that
matter), can result in an Instance(
change handles that also.
Change-Id: Ia3b4288691b392 d56324e9d13c92e 8e0b0d81e76 02fd1cbcdb76943 61c41e9400)
Closes-Bug: #1645464
(cherry picked from commit 4fce45f83bd5102