Comment 2 for bug 1645464

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/403925
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=4fce45f83bd510202fd1cbcdb7694361c41e9400
Submitter: Jenkins
Branch: master

commit 4fce45f83bd510202fd1cbcdb7694361c41e9400
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