commit dc44c48943f8ce66bbbdc2050ed2dc47778cf477
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
(cherry picked from commit d2690d6b038e200efed05bf7773898a0a8bb01d7)
Reviewed: https:/ /review. openstack. org/516400 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=dc44c48943f 8ce66bbbdc2050e d2dc47778cf477
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit dc44c48943f8ce6 6bbbdc2050ed2dc 47778cf477
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 efed05bf7773898 a0a8bb01d7)
Closes-Bug: #1727855
(cherry picked from commit d2690d6b038e200