HomeClusterLabs Projects

Refactor: scheduler: make colocated resources list a variant method

Description

Refactor: scheduler: make colocated resources list a variant method

Anytime we have "if group do this else do that," there's a good chance it
should be a variant method.

This takes find_colocated_rscs() and group_find_colocated_rscs() out of
pcmk_sched_utilization.c and turns them into a new colocated_resources()
variant method. This requires reordering the arguments a bit.

find_colocated_rsc() is renamed to pcmk__colocated_resources() and moved to a
new source file, pcmk_sched_resource.c, intended for functions that apply to
more than one variant.

group_find_colocated_rscs() is renamed to pcmk__group_colocated_resources() and
moved to pcmk_sched_group.c.

Details

Provenance
kgaillotAuthored on Oct 18 2021, 6:40 PM
Parents
rP4d07e60e973b: Refactor: scheduler: best practices for applying colocation to node weights
Branches
Unknown
Tags
Unknown

Event Timeline