Comment 6 for bug 1548980

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

Reviewed: https://review.openstack.org/283820
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=3d6bb233828ce63ae649e98e02dc59e04f3db2f5
Submitter: Jenkins
Branch: master

commit 3d6bb233828ce63ae649e98e02dc59e04f3db2f5
Author: Matt Riedemann <email address hidden>
Date: Tue Feb 23 16:34:39 2016 -0500

    Don't lazy-load instance.services if the instance is deleted

    The 2.16 microversion added the host_status extended
    server attribute which relies on the instance.services field.

    The primary join in the database for that field is dependent on
    the instance not being deleted.

    When listing deleted instances at microversion>=2.16, the
    compute API attempts to lazy-load the instance.services field
    which fails with an InstanceNotFound because the instance
    is deleted.

    In this case, it's best to just set instance.services to an
    empty ServiceList when lazy loading the services field on a
    deleted instance since the DB object won't have any value for
    the services attribute anyway.

    Change-Id: Ic2f239f634f917a5771b0401a5073546c710c036
    Closes-Bug: #1548980