nova/nova/conductor
Matt Riedemann 984dd8ad6a Validate new image via scheduler during rebuild
During a rebuild we bypass the scheduler because we are
always rebuilding the instance on the same host it's already
on. However, we allow passing a new image during rebuild
and that new image needs to be validated to work with the
instance host by running it through the scheduler filters,
like the ImagePropertiesFilter. Otherwise the new image
could violate constraints placed on the host by the admin.

This change checks to see if there is a new image provided
and if so, modifies the request spec passed to the scheduler
so that the new image is validated all while restricting
the scheduler to still pick the same host that the instance
is running on. If the image is not valid for the host, the
scheduler will raise NoValidHost and the rebuild stops.

A functional test is added to show the recreate of the bug
and that we probably stop the rebuild now in conductor by
calling the scheduler to validate the image.

Co-Authored-By: Sylvain Bauza <sbauza@redhat.com>

Closes-Bug: #1664931

Change-Id: I11746d1ea996a0f18b7c54b4c9c21df58cc4714b
2017-11-14 10:08:18 -05:00
..
tasks Make migration uuid hold allocations for migrating instances 2017-10-24 14:49:01 -07:00
__init__.py Remove conductor local api:s and 'use_local' config option 2016-10-18 14:26:06 +02:00
api.py Merge "Remove translation of log messages" 2017-08-10 11:39:03 +00:00
manager.py Validate new image via scheduler during rebuild 2017-11-14 10:08:18 -05:00
rpcapi.py Default reservations=None in Cells v1 and conductor APIs 2017-07-14 12:25:58 +00:00