HomeClusterLabs Projects

Feature: CIB: ignore location constraints with invalid scores

Description

Feature: CIB: ignore location constraints with invalid scores

Refactor generate_location_rule() to be less difficult to follow:

  • Functionize getting the score attribute name
  • Functionize getting the score directly from the rule
  • Functionize getting the score from an attribute

These replace get_node_score(), and use pcmk_parse_score() instead of
char2score() to detect errors. The constraint is now ignored if it has
configuration errors.

An invalid score in a node attribute just gets a warning, since it's not
a configuration error. -INFINITY is used instead of 0 as previously, for
consistency with an unset node attribute.

Some variables are refactored and renamed as well.

This breaks behavioral backward compatibility.

Details

Provenance
kgaillotAuthored on Sep 3 2024, 4:57 PM
Parents
rP9585cf3bc9e0: Log: scheduler: warn for invalid promotion scores
Branches
Unknown
Tags
Unknown