mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
If there are no affinities on a job, we don't want to count an affinity score of zero in the number of scores we divide the normalized score by. This is how we handle other scoring components like node reschedule penalties on nodes that weren't running the previous allocation. But we also exclude counting the affinity in the case where we have affinity but the value is zero. In pathological cases, this can result in a node with a low affinity being picked over a node with no affinity, because the denominator is 1 larger. Include zero-value affinities in the count of scores if the job has affinities but the value just happens to be zero. Fixes: https://github.com/hashicorp/nomad/issues/25621
4 lines
125 B
Plaintext
4 lines
125 B
Plaintext
```release-note:bug
|
|
scheduler: Fixed a bug where a node with no affinity could be selected over a node with low affinity
|
|
```
|