nova/nova/scheduler
Dan Smith bdb5c3b405 Change consecutive build failure limit to a weigher
There is concern over the ability for compute nodes to reasonably
determine which events should count against its consecutive build
failures. Since the compute may erronenously disable itself in
response to mundane or otherwise intentional user-triggered events,
this patch adds a scheduler weigher that considers the build failure
counter and can negatively weigh hosts with recent failures. This
avoids taking computes fully out of rotation, rather treating them as
less likely to be picked for a subsequent scheduling
operation.

This introduces a new conf option to control this weight. The default
is set high to maintain the existing behavior of picking nodes that
are not experiencing high failure rates, and resetting the counter as
soon as a single successful build occurs. This is minimal visible
change from the existing behavior with default configuration.

The rationale behind the default value for this weigher comes from the
values likely to be generated by its peer weighers. The RAM and Disk
weighers will increase the score by number of available megabytes of
memory (range in thousands) and disk (range in millions). The default
value of 1000000 for the build failure weigher will cause competing
nodes with similar amounts of available disk and a small (less than ten)
number of failures to become less desirable than those without, even
with many terabytes of available disk.

Conflicts:
	nova/conf/scheduler.py
	nova/test.py

NOTE(danms): The conflict was due to not having changes
Icee137e15f264da59a1bdc1dc1ecfeaac82b98c6 and
I911cc51a226d6af29d63a7a2c69253de870073e9 in Queens.

NOTE(danms): Because IronicHostManager was a thing in pike, this
includes the fix applied late to queens in this commit:
d26dc0ca03

Change-Id: I71c56fe770f8c3f66db97fa542fdfdf2b9865fb8
Related-Bug: #1742102
(cherry picked from commit 91e29079a0)
(cherry picked from commit 43a84dbc1e)
2018-06-14 07:32:36 -07:00
..
client Handle @safe_connect returns None side effect in _ensure_resource_provider 2018-05-04 00:44:55 +01:00
filters Handle volume-backed instances in IsolatedHostsFilter 2018-02-12 15:13:53 -05:00
weights Change consecutive build failure limit to a weigher 2018-06-14 07:32:36 -07:00
__init__.py Improve hacking rule to avoid author markers 2014-05-05 14:35:20 +02:00
caching_scheduler.py Mark Chance and Caching schedulers as deprecated 2017-08-09 10:53:53 -07:00
chance.py Mark Chance and Caching schedulers as deprecated 2017-08-09 10:53:53 -07:00
driver.py placement: scheduler uses allocation candidates 2017-07-07 11:35:54 -04:00
filter_scheduler.py Fix an error in _get_host_states when deleting a compute node 2017-12-21 10:37:08 -05:00
host_manager.py Change consecutive build failure limit to a weigher 2018-06-14 07:32:36 -07:00
ironic_host_manager.py Change consecutive build failure limit to a weigher 2018-06-14 07:32:36 -07:00
manager.py Skip placement on rebuild in same host 2018-05-09 16:33:01 +01:00
rpcapi.py conf: remove *_topic config opts 2017-07-17 21:27:02 -07:00
utils.py Refined fix for validating image on rebuild 2017-11-27 20:51:11 -05:00