HomeClusterLabs Projects

Refactor: scheduler: best practices when checking actions

Description

Refactor: scheduler: best practices when checking actions

Add a doxygen block for check_actions(), use convenience functions where
appropriate, and improve comments, formatting, and log messages.

This does change behavior slightly; previously, node history was processed
under these conditions:

if (!pcmk__node_available(node) && !node->details->maintenance) {
    continue;
}
if (node->details->online
    || pcmk_is_set(data_set->flags, pe_flag_stonith_enabled)) {
    process_node_history(node, lrm_rscs, data_set);
}

I believe the second set of conditions is unnecessary. If
pcmk__node_available() is true, then node->details->online is true, so the
second conditions only mattered when node->details->maintenance is true.
I don't see a good reason to limit the processing (i.e., cancelling recurring
monitors) in that case.

Details

Provenance
kgaillotAuthored on Jan 10 2022, 6:28 PM
Parents
rPdf82b43b9725: Refactor: scheduler: functionize processing node history
Branches
Unknown
Tags
Unknown

Event Timeline