Comment 7 for bug 1727855

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

Reviewed: https://review.openstack.org/515530
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d2690d6b038e200efed05bf7773898a0a8bb01d7
Submitter: Zuul
Branch: master

commit d2690d6b038e200efed05bf7773898a0a8bb01d7
Author: Matt Riedemann <email address hidden>
Date: Thu Oct 26 17:33:35 2017 -0400

    Pass the correct image to build_request_spec in conductor.rebuild_instance

    If we're calling build_request_spec in conductor.rebuild_instance,
    it's because we are evacuating and the instance is so old it does
    not have a request spec. We need the request_spec to pass to the
    scheduler to pick a destination host for the evacuation.

    For evacuate, nova-api does not pass any image reference parameters,
    and even if it did, those are image IDs, not an image meta dict that
    build_request_spec expects, so this code has just always been wrong.

    This change fixes the problem by passing a primitive version of
    the instance.image_meta which build_request_spec will then return
    back to conductor and that gets used to build a RequestSpec object
    from primitives.

    It's important to use the correct image meta so that the scheduler
    can properly filter hosts using things like the
    AggregateImagePropertiesIsolation and ImagePropertiesFilter filters.

    Change-Id: I0c8ce65016287de7be921c312493667a8c7f762e
    Closes-Bug: #1727855