HomeClusterLabs Projects

Refactor: scheduler: add methods for creating colocation lists

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

Refactor: scheduler: add methods for creating colocation lists

pe_resource_t has rsc_cons and rsc_cons_lhs members for colocations involving
the resource.

Currently, when a group is assigned, its constraints are moved to its first and
last members' (via expand_group_colocations()). That means that code accessing
the constraint lists gets different results depending on whether the resource
has been assigned yet.

Similarly, when a clone is assigned, its constraints are copied to each
instance's, though not removed from the clone (via append_parent_colocation()).

When a group member or clone instance is assigned, its flags follow this
sequence:

  • Initially: pe_rsc_provisional is set, pe_rsc_allocating is not
  • Assigment begins: pe_rsc_provisional and pe_rsc_allocating are both set
  • Assigment ends: pe_rsc_provisional and pe_rsc_allocating are both cleared

This commit adds new resource methods with_this_colocations() and
this_with_locations() to generate colocation lists combining the given
resource's with its parents' colocations as appropriate.

The new methods check the above flags to preserve the existing behavior as of
this commit. Also, nothing uses the new methods as of this commit.

Details

Provenance
kgaillotAuthored on Nov 8 2022, 10:43 AM

Commit No Longer Exists

This commit no longer exists in the repository.