HomeClusterLabs Projects

Refactor: scheduler: best practices when checking for role changes

Description

Refactor: scheduler: best practices when checking for role changes

Rename check_promotable_actions() to check_for_role_change() for readability,
add a doxygen block, use bool instead of gboolean, and improve comments and
formatting.

Use case-sensitive comparisons for action names.

The lone caller can be simplified since it doesn't care whether a particular
instance is changing role, just whether any instance is changing role. This is
more efficient since we can short-circuit the action comparisons if we've
already found promotion and demotion actions.

Details

Provenance
kgaillotAuthored on May 9 2022, 6:39 PM
Parents
rP8b7b4294109e: Refactor: scheduler: best practices when ordering instance demotion
Branches
Unknown
Tags
Unknown