HomeClusterLabs Projects

Refactor: scheduler: remove redundant code in generate_location_rule()

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

Description

Refactor: scheduler: remove redundant code in generate_location_rule()

The function created a list of nodes that a single rule in the constraint
applies to in two ways:

  1. For boolean-op="and", it started by making a copy of all nodes in the cluster, then removed all nodes for which the rule fails.
  1. For boolean-op="or", it started with an empty list, then added all nodes for which the rule passes.

These produce the exact same list. It is hard to imagine what misunderstanding
even led to the design. Use the same method for both.

Also, pcmk_evaluate_rule() already trace-logs its result, so we don't need to
do it again here.

Details

Provenance
kgaillotAuthored on Mar 19 2024, 7:59 PM

Commit No Longer Exists

This commit no longer exists in the repository.