scheduler selects the same ironic node several times
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Pavlo Shchelokovskyy |
Bug Description
Observed on ironic multinode grenade job (using Ocata scheduler).
Ironic returns its nodes in the same relative order (by internal DB id). Quite often (and in DevStack always by default) ironic nodes are identical, thus filter scheduler gives them the same weight. As a result, during concurrent requests to schedule instances, the weighed_hosts list goes always in the same order and is being always consumed from the start.
This leads to the first node selected often enough to exceed the default number of retries when it is being stolen by another concurrent request (as it also always picks the first one from the list).
See log examples from the same gate job [0-2], failure [3] (ServerActionsT
This could be fixed by increasing the host_subset_size config option from its default value of 1,
which would bring some randomness to the first element.
While fine (and actually recommended) for baremetal-only case, this choice is a bit suboptimal in a mixed hypervizor (virtual+ironic computes) as it makes scheduling logic for virtual computes less ideal.
Instead, it might be better to always randomize the first hosts in the weighed_hosts list for hosts with identical (and maximal) weight as those should be equally good candidates to schedule to. This will decrease collision and rescheduling chances, definitely for ironic nodes, but also to some tiny extent for standard compute hosts as well.
Changed in nova: | |
assignee: | nobody → Pavlo Shchelokovskyy (pshchelo) |
status: | New → In Progress |
patch proposed https:/ /review. openstack. org/#/c/ 494136/