pacemaker  2.1.7-0f7f88312f
Scalable High-Availability cluster resource manager
Functions | Variables
utils.c File Reference
#include <crm_internal.h>
#include <glib.h>
#include <stdbool.h>
#include <crm/crm.h>
#include <crm/msg_xml.h>
#include <crm/pengine/rules.h>
#include <crm/pengine/internal.h>
#include "pe_status_private.h"
Include dependency graph for utils.c:

Go to the source code of this file.

Functions

gboolean ghash_free_str_str (gpointer key, gpointer value, gpointer user_data)
 
bool pe_can_fence (const pcmk_scheduler_t *scheduler, const pcmk_node_t *node)
 
pcmk_node_tpe__copy_node (const pcmk_node_t *this_node)
 
GHashTable * pe__node_list2table (const GList *list)
 
gint pe__cmp_node_name (gconstpointer a, gconstpointer b)
 
void pe__show_node_scores_as (const char *file, const char *function, int line, bool to_log, const pcmk_resource_t *rsc, const char *comment, GHashTable *nodes, pcmk_scheduler_t *scheduler)
 
gint pe__cmp_rsc_priority (gconstpointer a, gconstpointer b)
 
void resource_location (pcmk_resource_t *rsc, const pcmk_node_t *node, int score, const char *tag, pcmk_scheduler_t *scheduler)
 
time_t get_effective_time (pcmk_scheduler_t *scheduler)
 
gboolean get_target_role (const pcmk_resource_t *rsc, enum rsc_role_e *role)
 
gboolean order_actions (pcmk_action_t *lh_action, pcmk_action_t *rh_action, uint32_t flags)
 
void destroy_ticket (gpointer data)
 
pcmk_ticket_tticket_new (const char *ticket_id, pcmk_scheduler_t *scheduler)
 
const char * rsc_printable_id (const pcmk_resource_t *rsc)
 
void pe__clear_resource_flags_recursive (pcmk_resource_t *rsc, uint64_t flags)
 
void pe__clear_resource_flags_on_all (pcmk_scheduler_t *scheduler, uint64_t flag)
 
void pe__set_resource_flags_recursive (pcmk_resource_t *rsc, uint64_t flags)
 
void trigger_unfencing (pcmk_resource_t *rsc, pcmk_node_t *node, const char *reason, pcmk_action_t *dependency, pcmk_scheduler_t *scheduler)
 
gboolean add_tag_ref (GHashTable *tags, const char *tag_name, const char *obj_ref)
 
bool pe__shutdown_requested (const pcmk_node_t *node)
 
void pe__update_recheck_time (time_t recheck, pcmk_scheduler_t *scheduler, const char *reason)
 
void pe__unpack_dataset_nvpairs (const xmlNode *xml_obj, const char *set_name, const pe_rule_eval_data_t *rule_data, GHashTable *hash, const char *always_first, gboolean overwrite, pcmk_scheduler_t *scheduler)
 
bool pe__resource_is_disabled (const pcmk_resource_t *rsc)
 
bool pe__rsc_running_on_only (const pcmk_resource_t *rsc, const pcmk_node_t *node)
 
bool pe__rsc_running_on_any (pcmk_resource_t *rsc, GList *node_list)
 
bool pcmk__rsc_filtered_by_node (pcmk_resource_t *rsc, GList *only_node)
 
GList * pe__filter_rsc_list (GList *rscs, GList *filter)
 
GList * pe__build_node_name_list (pcmk_scheduler_t *scheduler, const char *s)
 
GList * pe__build_rsc_list (pcmk_scheduler_t *scheduler, const char *s)
 
xmlNode * pe__failed_probe_for_rsc (const pcmk_resource_t *rsc, const char *name)
 

Variables

bool pcmk__is_daemon
 

Function Documentation

◆ add_tag_ref()

gboolean add_tag_ref ( GHashTable *  tags,
const char *  tag_name,
const char *  obj_ref 
)

Definition at line 617 of file utils.c.

◆ destroy_ticket()

void destroy_ticket ( gpointer  data)

Definition at line 498 of file utils.c.

◆ get_effective_time()

time_t get_effective_time ( pcmk_scheduler_t scheduler)

Definition at line 396 of file utils.c.

◆ get_target_role()

gboolean get_target_role ( const pcmk_resource_t rsc,
enum rsc_role_e role 
)

Definition at line 411 of file utils.c.

◆ ghash_free_str_str()

gboolean ghash_free_str_str ( gpointer  key,
gpointer  value,
gpointer  user_data 
)

◆ order_actions()

gboolean order_actions ( pcmk_action_t lh_action,
pcmk_action_t rh_action,
uint32_t  flags 
)

Definition at line 450 of file utils.c.

◆ pcmk__rsc_filtered_by_node()

bool pcmk__rsc_filtered_by_node ( pcmk_resource_t rsc,
GList *  only_node 
)

Definition at line 775 of file utils.c.

◆ pe__build_node_name_list()

GList* pe__build_node_name_list ( pcmk_scheduler_t scheduler,
const char *  s 
)

Definition at line 801 of file utils.c.

◆ pe__build_rsc_list()

GList* pe__build_rsc_list ( pcmk_scheduler_t scheduler,
const char *  s 
)

Definition at line 834 of file utils.c.

◆ pe__clear_resource_flags_on_all()

void pe__clear_resource_flags_on_all ( pcmk_scheduler_t scheduler,
uint64_t  flag 
)

Definition at line 562 of file utils.c.

◆ pe__clear_resource_flags_recursive()

void pe__clear_resource_flags_recursive ( pcmk_resource_t rsc,
uint64_t  flags 
)

Definition at line 552 of file utils.c.

◆ pe__cmp_node_name()

gint pe__cmp_node_name ( gconstpointer  a,
gconstpointer  b 
)

Definition at line 146 of file utils.c.

◆ pe__cmp_rsc_priority()

gint pe__cmp_rsc_priority ( gconstpointer  a,
gconstpointer  b 
)

Definition at line 296 of file utils.c.

◆ pe__copy_node()

pcmk_node_t* pe__copy_node ( const pcmk_node_t this_node)

Definition at line 89 of file utils.c.

◆ pe__failed_probe_for_rsc()

xmlNode* pe__failed_probe_for_rsc ( const pcmk_resource_t rsc,
const char *  name 
)

Definition at line 869 of file utils.c.

◆ pe__filter_rsc_list()

GList* pe__filter_rsc_list ( GList *  rscs,
GList *  filter 
)

Definition at line 781 of file utils.c.

◆ pe__node_list2table()

GHashTable* pe__node_list2table ( const GList *  list)

Definition at line 116 of file utils.c.

◆ pe__resource_is_disabled()

bool pe__resource_is_disabled ( const pcmk_resource_t rsc)

Definition at line 725 of file utils.c.

◆ pe__rsc_running_on_any()

bool pe__rsc_running_on_any ( pcmk_resource_t rsc,
GList *  node_list 
)

Definition at line 761 of file utils.c.

◆ pe__rsc_running_on_only()

bool pe__rsc_running_on_only ( const pcmk_resource_t rsc,
const pcmk_node_t node 
)

Definition at line 754 of file utils.c.

◆ pe__set_resource_flags_recursive()

void pe__set_resource_flags_recursive ( pcmk_resource_t rsc,
uint64_t  flags 
)

Definition at line 571 of file utils.c.

◆ pe__show_node_scores_as()

void pe__show_node_scores_as ( const char *  file,
const char *  function,
int  line,
bool  to_log,
const pcmk_resource_t rsc,
const char *  comment,
GHashTable *  nodes,
pcmk_scheduler_t scheduler 
)

Definition at line 250 of file utils.c.

◆ pe__shutdown_requested()

bool pe__shutdown_requested ( const pcmk_node_t node)

Definition at line 666 of file utils.c.

◆ pe__unpack_dataset_nvpairs()

void pe__unpack_dataset_nvpairs ( const xmlNode *  xml_obj,
const char *  set_name,
const pe_rule_eval_data_t rule_data,
GHashTable *  hash,
const char *  always_first,
gboolean  overwrite,
pcmk_scheduler_t scheduler 
)

Definition at line 707 of file utils.c.

◆ pe__update_recheck_time()

void pe__update_recheck_time ( time_t  recheck,
pcmk_scheduler_t scheduler,
const char *  reason 
)

Definition at line 682 of file utils.c.

◆ pe_can_fence()

bool pe_can_fence ( const pcmk_scheduler_t scheduler,
const pcmk_node_t node 
)

Definition at line 36 of file utils.c.

◆ resource_location()

void resource_location ( pcmk_resource_t rsc,
const pcmk_node_t node,
int  score,
const char *  tag,
pcmk_scheduler_t scheduler 
)

Definition at line 360 of file utils.c.

◆ rsc_printable_id()

const char* rsc_printable_id ( const pcmk_resource_t rsc)

Definition at line 546 of file utils.c.

◆ ticket_new()

pcmk_ticket_t* ticket_new ( const char *  ticket_id,
pcmk_scheduler_t scheduler 
)

Definition at line 510 of file utils.c.

◆ trigger_unfencing()

void trigger_unfencing ( pcmk_resource_t rsc,
pcmk_node_t node,
const char *  reason,
pcmk_action_t dependency,
pcmk_scheduler_t scheduler 
)

Definition at line 581 of file utils.c.

Variable Documentation

◆ pcmk__is_daemon

bool pcmk__is_daemon

Definition at line 47 of file logging.c.