HomeClusterLabs Projects

Refactor: scheduler: parse recurring history entry once

Description

Refactor: scheduler: parse recurring history entry once

Previously, pcmk__create_recurring_actions() passed the op history XML to both
recurring_op_for_active() and recurring_op_for_inactive(), which would parse
certain information from it.

Now, define a struct for the parsed info, and have is_recurring_action()
populate it, so it only needs to be done once.

This also makes it easy to give a clear error log if an invalid role is
configured.

Details

Provenance
kgaillotAuthored on Jun 7 2022, 2:00 PM
Parents
rP8c26886bf841: Refactor: scheduler: best practices for is_recurring_action()
Branches
Unknown
Tags
Unknown