pacemaker  1.1.17-b36b869ca8
Scalable High-Availability cluster resource manager
Macros | Functions | Variables
utils.c File Reference
#include <crm_internal.h>
#include <crm/crm.h>
#include <crm/msg_xml.h>
#include <crm/common/xml.h>
#include <crm/common/util.h>
#include <glib.h>
#include <crm/pengine/rules.h>
#include <crm/pengine/internal.h>
Include dependency graph for utils.c:

Go to the source code of this file.

Macros

#define sort_return(an_int, why)
 

Functions

xmlNode * get_object_root (const char *object_type, xmlNode *the_root)
 
void print_str_str (gpointer key, gpointer value, gpointer user_data)
 
gboolean ghash_free_str_str (gpointer key, gpointer value, gpointer user_data)
 
void unpack_operation (action_t *action, xmlNode *xml_obj, resource_t *container, pe_working_set_t *data_set)
 
bool pe_can_fence (pe_working_set_t *data_set, node_t *node)
 
node_tnode_copy (const node_t *this_node)
 
void node_list_exclude (GHashTable *hash, GListPtr list, gboolean merge_scores)
 
GHashTable * node_hash_from_list (GListPtr list)
 
GListPtr node_list_dup (GListPtr list1, gboolean reset, gboolean filter)
 
gint sort_node_uname (gconstpointer a, gconstpointer b)
 
void dump_node_scores_worker (int level, const char *file, const char *function, int line, resource_t *rsc, const char *comment, GHashTable *nodes)
 
void dump_node_capacity (int level, const char *comment, node_t *node)
 
void dump_rsc_utilization (int level, const char *comment, resource_t *rsc, node_t *node)
 
gint sort_rsc_index (gconstpointer a, gconstpointer b)
 
gint sort_rsc_priority (gconstpointer a, gconstpointer b)
 
action_tcustom_action (resource_t *rsc, char *key, const char *task, node_t *on_node, gboolean optional, gboolean save_action, pe_working_set_t *data_set)
 
xmlNode * find_rsc_op_entry (resource_t *rsc, const char *key)
 
void print_node (const char *pre_text, node_t *node, gboolean details)
 
void print_resource (int log_level, const char *pre_text, resource_t *rsc, gboolean details)
 
void pe_free_action (action_t *action)
 
GListPtr find_recurring_actions (GListPtr input, node_t *not_on_node)
 
enum action_tasks get_complex_task (resource_t *rsc, const char *name, gboolean allow_non_atomic)
 
action_tfind_first_action (GListPtr input, const char *uuid, const char *task, node_t *on_node)
 
GListPtr find_actions (GListPtr input, const char *key, const node_t *on_node)
 
GListPtr find_actions_exact (GListPtr input, const char *key, node_t *on_node)
 
void resource_location (resource_t *rsc, node_t *node, int score, const char *tag, pe_working_set_t *data_set)
 
gint sort_op_by_callid (gconstpointer a, gconstpointer b)
 
time_t get_effective_time (pe_working_set_t *data_set)
 
gboolean get_target_role (resource_t *rsc, enum rsc_role_e *role)
 
gboolean order_actions (action_t *lh_action, action_t *rh_action, enum pe_ordering order)
 
action_tget_pseudo_op (const char *name, pe_working_set_t *data_set)
 
void destroy_ticket (gpointer data)
 
ticket_tticket_new (const char *ticket_id, pe_working_set_t *data_set)
 
bool fix_remote_addr (resource_t *rsc)
 
op_digest_cache_trsc_action_digest_cmp (resource_t *rsc, xmlNode *xml_op, node_t *node, pe_working_set_t *data_set)
 
const char * rsc_printable_id (resource_t *rsc)
 
void clear_bit_recursive (resource_t *rsc, unsigned long long flag)
 
void set_bit_recursive (resource_t *rsc, unsigned long long flag)
 
action_tpe_fence_op (node_t *node, const char *op, bool optional, pe_working_set_t *data_set)
 
void trigger_unfencing (resource_t *rsc, node_t *node, const char *reason, action_t *dependency, pe_working_set_t *data_set)
 
gboolean add_tag_ref (GHashTable *tags, const char *tag_name, const char *obj_ref)
 

Variables

pe_working_set_tpe_dataset = NULL
 

Macro Definition Documentation

§ sort_return

#define sort_return (   an_int,
  why 
)
Value:
do { \
free(a_uuid); \
free(b_uuid); \
crm_trace("%s (%d) %c %s (%d) : %s", \
a_xml_id, a_call_id, an_int>0?'>':an_int<0?'<':'=', \
b_xml_id, b_call_id, why); \
return an_int; \
} while(0)

Definition at line 1343 of file utils.c.

Function Documentation

§ add_tag_ref()

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

Definition at line 1933 of file utils.c.

§ clear_bit_recursive()

void clear_bit_recursive ( resource_t rsc,
unsigned long long  flag 
)

Definition at line 1838 of file utils.c.

§ custom_action()

action_t* custom_action ( resource_t rsc,
char *  key,
const char *  task,
node_t on_node,
gboolean  optional,
gboolean  save_action,
pe_working_set_t data_set 
)

Definition at line 371 of file utils.c.

§ destroy_ticket()

void destroy_ticket ( gpointer  data)

Definition at line 1588 of file utils.c.

§ dump_node_capacity()

void dump_node_capacity ( int  level,
const char *  comment,
node_t node 
)

Definition at line 274 of file utils.c.

§ dump_node_scores_worker()

void dump_node_scores_worker ( int  level,
const char *  file,
const char *  function,
int  line,
resource_t rsc,
const char *  comment,
GHashTable *  nodes 
)

Definition at line 186 of file utils.c.

§ dump_rsc_utilization()

void dump_rsc_utilization ( int  level,
const char *  comment,
resource_t rsc,
node_t node 
)

Definition at line 295 of file utils.c.

§ find_actions()

GListPtr find_actions ( GListPtr  input,
const char *  key,
const node_t on_node 
)

Definition at line 1216 of file utils.c.

§ find_actions_exact()

GListPtr find_actions_exact ( GListPtr  input,
const char *  key,
node_t on_node 
)

Definition at line 1256 of file utils.c.

§ find_first_action()

action_t* find_first_action ( GListPtr  input,
const char *  uuid,
const char *  task,
node_t on_node 
)

Definition at line 1186 of file utils.c.

§ find_recurring_actions()

GListPtr find_recurring_actions ( GListPtr  input,
node_t not_on_node 
)

Definition at line 1128 of file utils.c.

§ find_rsc_op_entry()

xmlNode* find_rsc_op_entry ( resource_t rsc,
const char *  key 
)

Definition at line 1041 of file utils.c.

§ fix_remote_addr()

bool fix_remote_addr ( resource_t rsc)

Definition at line 1678 of file utils.c.

§ get_complex_task()

enum action_tasks get_complex_task ( resource_t rsc,
const char *  name,
gboolean  allow_non_atomic 
)

Definition at line 1162 of file utils.c.

§ get_effective_time()

time_t get_effective_time ( pe_working_set_t data_set)

Definition at line 1468 of file utils.c.

§ get_object_root()

xmlNode* get_object_root ( const char *  object_type,
xmlNode *  the_root 
)

Definition at line 230 of file cib_utils.c.

§ get_pseudo_op()

action_t* get_pseudo_op ( const char *  name,
pe_working_set_t data_set 
)

Definition at line 1571 of file utils.c.

§ get_target_role()

gboolean get_target_role ( resource_t rsc,
enum rsc_role_e role 
)

Definition at line 1483 of file utils.c.

§ ghash_free_str_str()

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

§ node_copy()

node_t* node_copy ( const node_t this_node)

Definition at line 79 of file utils.c.

§ node_hash_from_list()

GHashTable* node_hash_from_list ( GListPtr  list)

Definition at line 135 of file utils.c.

§ node_list_dup()

GListPtr node_list_dup ( GListPtr  list1,
gboolean  reset,
gboolean  filter 
)

Definition at line 151 of file utils.c.

§ node_list_exclude()

void node_list_exclude ( GHashTable *  hash,
GListPtr  list,
gboolean  merge_scores 
)

Definition at line 100 of file utils.c.

§ order_actions()

gboolean order_actions ( action_t lh_action,
action_t rh_action,
enum pe_ordering  order 
)

Definition at line 1519 of file utils.c.

§ pe_can_fence()

bool pe_can_fence ( pe_working_set_t data_set,
node_t node 
)

Definition at line 52 of file utils.c.

§ pe_fence_op()

action_t* pe_fence_op ( node_t node,
const char *  op,
bool  optional,
pe_working_set_t data_set 
)

Definition at line 1864 of file utils.c.

§ pe_free_action()

void pe_free_action ( action_t action)

Definition at line 1107 of file utils.c.

§ print_node()

void print_node ( const char *  pre_text,
node_t node,
gboolean  details 
)

Definition at line 1047 of file utils.c.

§ print_resource()

void print_resource ( int  log_level,
const char *  pre_text,
resource_t rsc,
gboolean  details 
)

Definition at line 1091 of file utils.c.

§ print_str_str()

void print_str_str ( gpointer  key,
gpointer  value,
gpointer  user_data 
)

Definition at line 1083 of file utils.c.

§ resource_location()

void resource_location ( resource_t rsc,
node_t node,
int  score,
const char *  tag,
pe_working_set_t data_set 
)

Definition at line 1309 of file utils.c.

§ rsc_action_digest_cmp()

op_digest_cache_t* rsc_action_digest_cmp ( resource_t rsc,
xmlNode *  xml_op,
node_t node,
pe_working_set_t data_set 
)

Definition at line 1715 of file utils.c.

§ rsc_printable_id()

const char* rsc_printable_id ( resource_t rsc)

Definition at line 1829 of file utils.c.

§ set_bit_recursive()

void set_bit_recursive ( resource_t rsc,
unsigned long long  flag 
)

Definition at line 1851 of file utils.c.

§ sort_node_uname()

gint sort_node_uname ( gconstpointer  a,
gconstpointer  b 
)

Definition at line 177 of file utils.c.

§ sort_op_by_callid()

gint sort_op_by_callid ( gconstpointer  a,
gconstpointer  b 
)

Definition at line 1353 of file utils.c.

§ sort_rsc_index()

gint sort_rsc_index ( gconstpointer  a,
gconstpointer  b 
)

Definition at line 317 of file utils.c.

§ sort_rsc_priority()

gint sort_rsc_priority ( gconstpointer  a,
gconstpointer  b 
)

Definition at line 344 of file utils.c.

§ ticket_new()

ticket_t* ticket_new ( const char *  ticket_id,
pe_working_set_t data_set 
)

Definition at line 1600 of file utils.c.

§ trigger_unfencing()

void trigger_unfencing ( resource_t rsc,
node_t node,
const char *  reason,
action_t dependency,
pe_working_set_t data_set 
)

Definition at line 1898 of file utils.c.

§ unpack_operation()

void unpack_operation ( action_t action,
xmlNode *  xml_obj,
resource_t container,
pe_working_set_t data_set 
)

Definition at line 670 of file utils.c.

Variable Documentation

§ pe_dataset

pe_working_set_t* pe_dataset = NULL

Definition at line 29 of file utils.c.