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.
Reviewed: https:/ /review. openstack. org/515530 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=d2690d6b038 e200efed05bf777 3898a0a8bb01d7
Committed: https:/
Submitter: Zuul
Branch: master
commit d2690d6b038e200 efed05bf7773898 a0a8bb01d7
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, request_ spec expects, so this code has just always been wrong.
and even if it did, those are image IDs, not an image meta dict that
build_
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 agePropertiesIs olation and ImageProperties Filter filters.
can properly filter hosts using things like the
AggregateIm
Change-Id: I0c8ce65016287d e7be921c3124936 67a8c7f762e
Closes-Bug: #1727855