diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 13:39:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 13:39:28 +0000 |
commit | 924f5ea83e48277e014ebf0d19a27187cb93e2f7 (patch) | |
tree | 75920a275bba045f6d108204562c218a9a26ea15 /lib/pengine/pe_health.c | |
parent | Adding upstream version 2.1.7. (diff) | |
download | pacemaker-upstream.tar.xz pacemaker-upstream.zip |
Adding upstream version 2.1.8~rc1.upstream/2.1.8_rc1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/pengine/pe_health.c')
-rw-r--r-- | lib/pengine/pe_health.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/lib/pengine/pe_health.c b/lib/pengine/pe_health.c index 93028ae..4f7eb10 100644 --- a/lib/pengine/pe_health.c +++ b/lib/pengine/pe_health.c @@ -1,5 +1,5 @@ /* - * Copyright 2004-2023 the Pacemaker project contributors + * Copyright 2004-2024 the Pacemaker project contributors * * The version control history for this file may have further details. * @@ -15,7 +15,8 @@ /*! * \internal - * \brief Set the node health values to use for "red", "yellow", and "green" + * \brief Set the node health values to use for \c PCMK_VALUE_RED, + * \c PCMK_VALUE_YELLOW, and \c PCMK_VALUE_GREEN * * \param[in,out] scheduler Scheduler data */ @@ -30,23 +31,23 @@ pe__unpack_node_health_scores(pcmk_scheduler_t *scheduler) break; case pcmk__health_strategy_no_red: - pcmk__score_red = -INFINITY; + pcmk__score_red = -PCMK_SCORE_INFINITY; pcmk__score_yellow = 0; pcmk__score_green = 0; break; case pcmk__health_strategy_only_green: - pcmk__score_red = -INFINITY; - pcmk__score_yellow = -INFINITY; + pcmk__score_red = -PCMK_SCORE_INFINITY; + pcmk__score_yellow = -PCMK_SCORE_INFINITY; pcmk__score_green = 0; break; default: // progressive or custom - pcmk__score_red = pe__health_score(PCMK__OPT_NODE_HEALTH_RED, + pcmk__score_red = pe__health_score(PCMK_OPT_NODE_HEALTH_RED, scheduler); - pcmk__score_green = pe__health_score(PCMK__OPT_NODE_HEALTH_GREEN, + pcmk__score_green = pe__health_score(PCMK_OPT_NODE_HEALTH_GREEN, scheduler); - pcmk__score_yellow = pe__health_score(PCMK__OPT_NODE_HEALTH_YELLOW, + pcmk__score_yellow = pe__health_score(PCMK_OPT_NODE_HEALTH_YELLOW, scheduler); break; } @@ -54,9 +55,9 @@ pe__unpack_node_health_scores(pcmk_scheduler_t *scheduler) if ((pcmk__score_red != 0) || (pcmk__score_yellow != 0) || (pcmk__score_green != 0)) { crm_debug("Values of node health scores: " - PCMK__VALUE_RED "=%d " - PCMK__VALUE_YELLOW "=%d " - PCMK__VALUE_GREEN "=%d", + PCMK_VALUE_RED "=%d " + PCMK_VALUE_YELLOW "=%d " + PCMK_VALUE_GREEN "=%d", pcmk__score_red, pcmk__score_yellow, pcmk__score_green); } } @@ -135,9 +136,9 @@ pe__node_health(pcmk_node_t *node) * or pcmk__score_yellow equals pcmk__score_green, so check the * textual value first to be able to distinguish those. */ - if (pcmk__str_eq(value, PCMK__VALUE_RED, pcmk__str_casei)) { + if (pcmk__str_eq(value, PCMK_VALUE_RED, pcmk__str_casei)) { return -1; - } else if (pcmk__str_eq(value, PCMK__VALUE_YELLOW, + } else if (pcmk__str_eq(value, PCMK_VALUE_YELLOW, pcmk__str_casei)) { rc = 0; continue; |