nova/nova/tests/unit/scheduler/weights
Johannes Kulik 5ab9ef11e2 Don't recompute weighers' minval/maxval attributes
Changing the minval/maxval attribute to the minimum/maxium of every
weigher run changes the outcome of future runs. We noticed it in the
SoftAffinityWeigher, where a previous run with a host hosting a lot of
instances for a server-group would make a later run use that maximum.
This resulted in the weight being lower than 1 for a host hosting all
instances of another server-group, if the number of instances of that
server-group on that host is less than a previous server-group's
instances on any host.

Previously, there were two places that computed the maxval/minval - once
in normalize() and once in weigh_objects() - but only the one in
weigh_objects() saved the values to the weigher.

The code now uses the maxval/minval as defined by the weigher and keeps
the weights inside the maxval-minval range. There's also only one place
to compute the minval/maxval now, if the weigher did not set a value:
normalize().

Closes-Bug: 1870096

Change-Id: I60a90dabcd21b4e049e218c7c55fa075bb7ff933
2020-04-01 11:46:48 +02:00
..
__init__.py Split scheduler weight test on ioops 2015-02-23 16:58:26 +11:00
test_cross_cell.py Add CrossCellWeigher 2019-12-12 12:40:29 -05:00
test_weights_affinity.py Don't recompute weighers' minval/maxval attributes 2020-04-01 11:46:48 +02:00
test_weights_compute.py Per aggregate scheduling weight 2019-01-21 11:48:44 +08:00
test_weights_cpu.py Per aggregate scheduling weight 2019-01-21 11:48:44 +08:00
test_weights_disk.py Per aggregate scheduling weight 2019-01-21 11:48:44 +08:00
test_weights_hosts.py scheduler: add soft-(anti-)affinity weighers 2016-01-07 10:43:57 +01:00
test_weights_ioopsweight.py Per aggregate scheduling weight 2019-01-21 11:48:44 +08:00
test_weights_metrics.py Per aggregate scheduling weight 2019-01-21 11:48:44 +08:00
test_weights_pci.py Per aggregate scheduling weight 2019-01-21 11:48:44 +08:00
test_weights_ram.py Per aggregate scheduling weight 2019-01-21 11:48:44 +08:00