nova/nova/scheduler
Dan Smith bbfc4230ef Refined fix for validating image on rebuild
This aims to fix the issue described in bug 1664931 where a rebuild
fails to validate the existing host with the scheduler when a new
image is provided. The previous attempt to do this could cause rebuilds
to fail unnecessarily because we ran _all_ of the filters during a
rebuild, which could cause usage/resource filters to prevent an otherwise
valid rebuild from succeeding.

This aims to classify filters as useful for rebuild or not, and only apply
the former during a rebuild scheduler check. We do this by using an internal
scheduler hint, indicating our intent. This should (a) filter out
all hosts other than the one we're running on and (b) be detectable by
the filtering infrastructure as an internally-generated scheduling request
in order to trigger the correct filtering behavior.

Conflicts:
      nova/scheduler/filters/exact_core_filter.py
      nova/scheduler/filters/exact_disk_filter.py
      nova/scheduler/filters/exact_ram_filter.py
      nova/scheduler/filters/type_filter.py

NOTE(mriedem): The conflicts were due to deprecation warnings
which don't exist in Ocata. The functional test also needed a missing
import and to use api_put() instead of put_service().

Closes-Bug: #1664931
Change-Id: I1a46ef1503be2febcd20f4594f44344d05525446
(cherry picked from commit f7c688b8ef)
(cherry picked from commit b29a461a8b)
2017-11-28 09:48:20 -05:00
..
client Changing deleting stale allocations warning to debug 2017-06-12 09:24:07 +00:00
filters Refined fix for validating image on rebuild 2017-11-28 09:48:20 -05:00
weights conf: Attempt to resolve TODOs in scheduler.py 2016-11-01 14:40:46 +00:00
__init__.py Improve hacking rule to avoid author markers 2014-05-05 14:35:20 +02:00
caching_scheduler.py Scheduler calling the Placement API 2017-01-27 16:36:34 -08:00
chance.py Move config options from nova/compute/rpcapi.py file 2016-04-21 22:26:13 +00:00
driver.py conf: Group scheduler options 2016-10-07 14:36:21 +01:00
filter_scheduler.py Scheduler calling the Placement API 2017-01-27 16:36:34 -08:00
host_manager.py Refined fix for validating image on rebuild 2017-11-28 09:48:20 -05:00
ironic_host_manager.py Fix TypeError in _update_from_compute_node race 2017-01-06 17:15:49 +00:00
manager.py Allow scheduler to run cell host discovery periodically 2017-02-01 12:22:23 -08:00
rpcapi.py Integrate OSProfiler and Nova 2017-01-18 15:00:14 +07:00
utils.py Refined fix for validating image on rebuild 2017-11-28 09:48:20 -05:00