57 crm_debug(
"Values of node health scores: " 75 add_node_health_value(gpointer key, gpointer value, gpointer user_data)
79 int *health = (
int *) user_data;
82 crm_trace(
"Combined '%s' into node health score (now %s)",
100 g_hash_table_foreach(node->
details->
attrs, add_node_health_value,
118 const char *
name = NULL;
119 const char *value = NULL;
132 while (g_hash_table_iter_next(&iter, (gpointer *) &
name,
133 (gpointer *) &value)) {
#define PCMK_OPT_NODE_HEALTH_GREEN
const char * pcmk_readable_score(int score)
Return a displayable static string for a score value.
#define PCMK_OPT_NODE_HEALTH_RED
int pe__node_health(pcmk_node_t *node)
pcmk_scheduler_t * data_set
#define crm_debug(fmt, args...)
int char2score(const char *score)
Get the integer value of a score string.
#define crm_trace(fmt, args...)
struct pe_node_shared_s * details
int pcmk__add_scores(int score1, int score2)
#define PCMK_OPT_NODE_HEALTH_YELLOW
Cluster status and scheduling.
void pe__unpack_node_health_scores(pcmk_scheduler_t *scheduler)
pcmk_scheduler_t * scheduler
bool pcmk__starts_with(const char *str, const char *prefix)
Check whether a string starts with a certain sequence.
#define PCMK_VALUE_YELLOW
#define PCMK_SCORE_INFINITY
Integer score to use to represent "infinity".
int pe__sum_node_health_scores(const pcmk_node_t *node, int base_health)