HomeClusterLabs Projects

Refactor: scheduler: make showing node weights more efficient

Description

Refactor: scheduler: make showing node weights more efficient

The scores_log_level global in libpacemaker wasn't really needed since it was
constant and not particularly worthwhile to abstract. dump_node_scores() used
its log severity argument as a boolean, so make that explicit, and rename the
function according to current style guidelines.

Use the new pcmk__log_else() macro to skip iterating through all nodes
(and again recursively for all child resources) when we're not tracing,
since we wouldn't do anything in that case anyway.

Details

Provenance
kgaillotAuthored on Nov 5 2019, 12:05 PM
Parents
rP477a6692b5c5: Log: libcrmcommon: new function to skip code if log severity is not active
Branches
Unknown
Tags
Unknown

Event Timeline