HomeClusterLabs Projects

Test: cts-scheduler: add test for group colocations with different primary…

Description

Test: cts-scheduler: add test for group colocations with different primary priorities

Resources are assigned by priority first, but if a resource is a dependent in a
colocation, it will defer assignment to the primary.

For this reason, pcmk__new_colocation() sorts colocations by primary priority,
so the highest-priority primary gets assigned first.

However, expand_group_colocations() currently concatenates the group's
colocations with the first member's colocations without sorting, leading to
substandard behavior in this test case.

The essential elements of this scenario are:

  • The cluster has a group group1, and two resources rsc2 and rsc3, such that group1 has the highest priority, then rsc3, then rsc2.
  • group1's first member is optionally colocated with rsc2.
  • group1 itself is optionally colocated with rsc3.
  • Utilization is used such that only one of rsc2 and rsc3 can run.

In this scenario, rsc3 should be the resource that runs, because it has higher
priority, but as of the current code, this is not the case.

Details

Provenance
kgaillotAuthored on Oct 27 2022, 1:32 PM
Parents
rPdd2670e91ac1: Test: cts-scheduler: add test for colocated groups with failed dependent
Branches
Unknown
Tags
Unknown