pacemaker  2.0.3-4b1f869f0f
Scalable High-Availability cluster resource manager
Data Structures | Macros | Typedefs | Enumerations | Functions
internal.h File Reference
#include <string.h>
#include <crm/pengine/status.h>
#include <crm/pengine/remote_internal.h>
#include <crm/common/output.h>
Include dependency graph for internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pe__location_constraint_s
 
struct  pe__order_constraint_s
 
struct  notify_data_s
 
struct  op_digest_cache_s
 

Macros

#define pe_rsc_info(rsc, fmt, args...)   crm_log_tag(LOG_INFO, rsc ? rsc->id : "<NULL>", fmt, ##args)
 
#define pe_rsc_debug(rsc, fmt, args...)   crm_log_tag(LOG_DEBUG, rsc ? rsc->id : "<NULL>", fmt, ##args)
 
#define pe_rsc_trace(rsc, fmt, args...)   crm_log_tag(LOG_TRACE, rsc ? rsc->id : "<NULL>", fmt, ##args)
 
#define pe_err(fmt...)   { was_processing_error = TRUE; crm_config_error = TRUE; crm_err(fmt); }
 
#define pe_warn(fmt...)   { was_processing_warning = TRUE; crm_config_warning = TRUE; crm_warn(fmt); }
 
#define pe_proc_err(fmt...)   { was_processing_error = TRUE; crm_err(fmt); }
 
#define pe_proc_warn(fmt...)   { was_processing_warning = TRUE; crm_warn(fmt); }
 
#define pe_set_action_bit(action, bit)   action->flags = crm_set_bit(__FUNCTION__, __LINE__, action->uuid, action->flags, bit)
 
#define pe_clear_action_bit(action, bit)   action->flags = crm_clear_bit(__FUNCTION__, __LINE__, action->uuid, action->flags, bit)
 
#define dump_node_scores(level, rsc, text, nodes)
 
#define delete_key(rsc)   generate_op_key(rsc->id, CRMD_ACTION_DELETE, 0)
 
#define delete_action(rsc, node, optional)
 
#define stopped_key(rsc)   generate_op_key(rsc->id, CRMD_ACTION_STOPPED, 0)
 
#define stopped_action(rsc, node, optional)
 
#define stop_key(rsc)   generate_op_key(rsc->id, CRMD_ACTION_STOP, 0)
 
#define stop_action(rsc, node, optional)
 
#define reload_key(rsc)   generate_op_key(rsc->id, CRMD_ACTION_RELOAD, 0)
 
#define start_key(rsc)   generate_op_key(rsc->id, CRMD_ACTION_START, 0)
 
#define start_action(rsc, node, optional)
 
#define started_key(rsc)   generate_op_key(rsc->id, CRMD_ACTION_STARTED, 0)
 
#define started_action(rsc, node, optional)
 
#define promote_key(rsc)   generate_op_key(rsc->id, CRMD_ACTION_PROMOTE, 0)
 
#define promote_action(rsc, node, optional)
 
#define promoted_key(rsc)   generate_op_key(rsc->id, CRMD_ACTION_PROMOTED, 0)
 
#define promoted_action(rsc, node, optional)
 
#define demote_key(rsc)   generate_op_key(rsc->id, CRMD_ACTION_DEMOTE, 0)
 
#define demote_action(rsc, node, optional)
 
#define demoted_key(rsc)   generate_op_key(rsc->id, CRMD_ACTION_DEMOTED, 0)
 
#define demoted_action(rsc, node, optional)
 
#define pe_action_required(action, reason, text)   pe_action_set_flag_reason(__FUNCTION__, __LINE__, action, reason, text, pe_action_optional, FALSE)
 
#define pe_action_implies(action, reason, flag)   pe_action_set_flag_reason(__FUNCTION__, __LINE__, action, reason, NULL, flag, FALSE)
 
#define BOOL2STR(x)   ((x) ? "true" : "false")
 

Typedefs

typedef struct pe__location_constraint_s pe__location_t
 
typedef struct pe__order_constraint_s pe__ordering_t
 
typedef struct notify_data_s notify_data_t
 
typedef struct op_digest_cache_s op_digest_cache_t
 

Enumerations

enum  pe_fc_flags_e { pe_fc_default = 0x00, pe_fc_effective = 0x01, pe_fc_fillers = 0x02 }
 
enum  rsc_digest_cmp_val { RSC_DIGEST_MATCH = 0, RSC_DIGEST_RESTART, RSC_DIGEST_ALL, RSC_DIGEST_UNKNOWN }
 

Functions

bool pe_can_fence (pe_working_set_t *data_set, node_t *node)
 
int merge_weights (int w1, int w2)
 
void add_hash_param (GHashTable *hash, const char *name, const char *value)
 
char * native_parameter (resource_t *rsc, node_t *node, gboolean create, const char *name, pe_working_set_t *data_set)
 
pe_node_tnative_location (const pe_resource_t *rsc, GList **list, int current)
 
void pe_metadata (void)
 
void verify_pe_options (GHashTable *options)
 
void common_update_score (resource_t *rsc, const char *id, int score)
 
void native_add_running (resource_t *rsc, node_t *node, pe_working_set_t *data_set)
 
gboolean native_unpack (resource_t *rsc, pe_working_set_t *data_set)
 
gboolean group_unpack (resource_t *rsc, pe_working_set_t *data_set)
 
gboolean clone_unpack (resource_t *rsc, pe_working_set_t *data_set)
 
gboolean pe__unpack_bundle (pe_resource_t *rsc, pe_working_set_t *data_set)
 
resource_tnative_find_rsc (resource_t *rsc, const char *id, const node_t *node, int flags)
 
gboolean native_active (resource_t *rsc, gboolean all)
 
gboolean group_active (resource_t *rsc, gboolean all)
 
gboolean clone_active (resource_t *rsc, gboolean all)
 
gboolean pe__bundle_active (pe_resource_t *rsc, gboolean all)
 
void native_print (resource_t *rsc, const char *pre_text, long options, void *print_data)
 
void group_print (resource_t *rsc, const char *pre_text, long options, void *print_data)
 
void clone_print (resource_t *rsc, const char *pre_text, long options, void *print_data)
 
void pe__print_bundle (pe_resource_t *rsc, const char *pre_text, long options, void *print_data)
 
int pe__name_and_nvpairs_xml (pcmk__output_t *out, bool is_list, const char *tag_name, size_t pairs_count,...)
 
int pe__clone_xml (pcmk__output_t *out, va_list args)
 
int pe__clone_html (pcmk__output_t *out, va_list args)
 
int pe__clone_text (pcmk__output_t *out, va_list args)
 
int pe__group_xml (pcmk__output_t *out, va_list args)
 
int pe__group_html (pcmk__output_t *out, va_list args)
 
int pe__group_text (pcmk__output_t *out, va_list args)
 
int pe__bundle_xml (pcmk__output_t *out, va_list args)
 
int pe__bundle_html (pcmk__output_t *out, va_list args)
 
int pe__bundle_text (pcmk__output_t *out, va_list args)
 
int pe__resource_xml (pcmk__output_t *out, va_list args)
 
int pe__resource_html (pcmk__output_t *out, va_list args)
 
int pe__resource_text (pcmk__output_t *out, va_list args)
 
void native_free (resource_t *rsc)
 
void group_free (resource_t *rsc)
 
void clone_free (resource_t *rsc)
 
void pe__free_bundle (pe_resource_t *rsc)
 
enum rsc_role_e native_resource_state (const resource_t *rsc, gboolean current)
 
enum rsc_role_e group_resource_state (const resource_t *rsc, gboolean current)
 
enum rsc_role_e clone_resource_state (const resource_t *rsc, gboolean current)
 
enum rsc_role_e pe__bundle_resource_state (const pe_resource_t *rsc, gboolean current)
 
void pe__count_common (pe_resource_t *rsc)
 
void pe__count_bundle (pe_resource_t *rsc)
 
gboolean common_unpack (xmlNode *xml_obj, resource_t **rsc, resource_t *parent, pe_working_set_t *data_set)
 
void common_free (resource_t *rsc)
 
node_tnode_copy (const node_t *this_node)
 
time_t get_effective_time (pe_working_set_t *data_set)
 
int pe_get_failcount (node_t *node, resource_t *rsc, time_t *last_failure, uint32_t flags, xmlNode *xml_op, pe_working_set_t *data_set)
 
pe_action_tpe__clear_failcount (pe_resource_t *rsc, pe_node_t *node, const char *reason, pe_working_set_t *data_set)
 Schedule a controller operation to clear a fail count. More...
 
pe_node_tpe__find_active_on (const pe_resource_t *rsc, unsigned int *count_all, unsigned int *count_clean)
 
pe_node_tpe__find_active_requires (const pe_resource_t *rsc, unsigned int *count)
 
void node_list_exclude (GHashTable *list, GListPtr list2, gboolean merge_scores)
 
GListPtr node_list_dup (GListPtr list, gboolean reset, gboolean filter)
 
GHashTable * node_hash_from_list (GListPtr list)
 
action_tget_pseudo_op (const char *name, pe_working_set_t *data_set)
 
gboolean order_actions (action_t *lh_action, action_t *rh_action, enum pe_ordering order)
 
GHashTable * node_hash_dup (GHashTable *hash)
 
void print_node (const char *pre_text, node_t *node, gboolean details)
 
void print_str_str (gpointer key, gpointer value, gpointer user_data)
 
void pe__output_node (node_t *node, gboolean details, pcmk__output_t *out)
 
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_priority (gconstpointer a, gconstpointer b)
 
gint sort_rsc_index (gconstpointer a, gconstpointer b)
 
xmlNode * find_rsc_op_entry (resource_t *rsc, const char *key)
 
action_tcustom_action (resource_t *rsc, char *key, const char *task, node_t *on_node, gboolean optional, gboolean foo, pe_working_set_t *data_set)
 
int pe_get_configured_timeout (resource_t *rsc, const char *action, pe_working_set_t *data_set)
 
action_tfind_first_action (GListPtr input, const char *uuid, const char *task, node_t *on_node)
 
enum action_tasks get_complex_task (resource_t *rsc, const char *name, gboolean allow_non_atomic)
 
GListPtr find_actions (GListPtr input, const char *key, const node_t *on_node)
 
GList * find_actions_exact (GList *input, const char *key, const pe_node_t *on_node)
 
GListPtr find_recurring_actions (GListPtr input, node_t *not_on_node)
 
GList * pe__resource_actions (const pe_resource_t *rsc, const pe_node_t *node, const char *task, bool require_node)
 Find all actions of given type for a resource. More...
 
void pe_free_action (action_t *action)
 
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)
 
gboolean get_target_role (resource_t *rsc, enum rsc_role_e *role)
 
resource_tfind_clone_instance (resource_t *rsc, const char *sub_id, pe_working_set_t *data_set)
 
void destroy_ticket (gpointer data)
 
ticket_tticket_new (const char *ticket_id, pe_working_set_t *data_set)
 
const char * pe_base_name_end (const char *id)
 
char * clone_strip (const char *last_rsc_id)
 
char * clone_zero (const char *last_rsc_id)
 
int pe__target_rc_from_xml (xmlNode *xml_op)
 
gint sort_node_uname (gconstpointer a, gconstpointer b)
 
bool is_set_recursive (resource_t *rsc, long long flag, bool any)
 
op_digest_cache_trsc_action_digest_cmp (resource_t *rsc, xmlNode *xml_op, node_t *node, pe_working_set_t *data_set)
 
action_tpe_fence_op (node_t *node, const char *op, bool optional, const char *reason, 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)
 
void pe_action_set_reason (pe_action_t *action, const char *reason, bool overwrite)
 
void pe_action_set_flag_reason (const char *function, long line, pe_action_t *action, pe_action_t *reason, const char *text, enum pe_action_flags flags, bool overwrite)
 
void set_bit_recursive (resource_t *rsc, unsigned long long flag)
 
void clear_bit_recursive (resource_t *rsc, unsigned long long flag)
 
gboolean add_tag_ref (GHashTable *tags, const char *tag_name, const char *obj_ref)
 
void print_rscs_brief (GListPtr rsc_list, const char *pre_text, long options, void *print_data, gboolean print_all)
 
void pe__rscs_brief_output (pcmk__output_t *out, GListPtr rsc_list, long options, gboolean print_all)
 
void pe_fence_node (pe_working_set_t *data_set, node_t *node, const char *reason)
 Schedule a fence action for a node. More...
 
node_tpe_create_node (const char *id, const char *uname, const char *type, const char *score, pe_working_set_t *data_set)
 
bool remote_id_conflict (const char *remote_name, pe_working_set_t *data)
 
void common_print (resource_t *rsc, const char *pre_text, const char *name, node_t *node, long options, void *print_data)
 
void pe__common_output_text (pcmk__output_t *out, resource_t *rsc, const char *name, node_t *node, long options)
 
void pe__common_output_html (pcmk__output_t *out, resource_t *rsc, const char *name, node_t *node, long options)
 
pe_resource_tpe__find_bundle_replica (const pe_resource_t *bundle, const pe_node_t *node)
 
bool pe__bundle_needs_remote_name (pe_resource_t *rsc)
 
const char * pe__add_bundle_remote_name (pe_resource_t *rsc, xmlNode *xml, const char *field)
 
const char * pe_node_attribute_calculated (const pe_node_t *node, const char *name, const resource_t *rsc)
 
const char * pe_node_attribute_raw (pe_node_t *node, const char *name)
 
bool pe__is_universal_clone (pe_resource_t *rsc, pe_working_set_t *data_set)
 
void pe__add_param_check (xmlNode *rsc_op, pe_resource_t *rsc, pe_node_t *node, enum pe_check_parameters, pe_working_set_t *data_set)
 
void pe__foreach_param_check (pe_working_set_t *data_set, void(*cb)(pe_resource_t *, pe_node_t *, xmlNode *, enum pe_check_parameters, pe_working_set_t *))
 
void pe__free_param_checks (pe_working_set_t *data_set)
 
bool pe__shutdown_requested (pe_node_t *node)
 
void pe__update_recheck_time (time_t recheck, pe_working_set_t *data_set)
 
void pe__register_messages (pcmk__output_t *out)
 
void pe__unpack_dataset_nvpairs (xmlNode *xml_obj, const char *set_name, GHashTable *node_hash, GHashTable *hash, const char *always_first, gboolean overwrite, pe_working_set_t *data_set)
 
bool pe__resource_is_disabled (pe_resource_t *rsc)
 

Macro Definition Documentation

◆ BOOL2STR

#define BOOL2STR (   x)    ((x) ? "true" : "false")

Definition at line 389 of file internal.h.

◆ delete_action

#define delete_action (   rsc,
  node,
  optional 
)
Value:
rsc, delete_key(rsc), CRMD_ACTION_DELETE, node, \
optional, TRUE, data_set);

Definition at line 220 of file internal.h.

◆ delete_key

#define delete_key (   rsc)    generate_op_key(rsc->id, CRMD_ACTION_DELETE, 0)

Definition at line 219 of file internal.h.

◆ demote_action

#define demote_action (   rsc,
  node,
  optional 
)
Value:
rsc, demote_key(rsc), CRMD_ACTION_DEMOTE, node, \
optional, TRUE, data_set)

Definition at line 256 of file internal.h.

◆ demote_key

#define demote_key (   rsc)    generate_op_key(rsc->id, CRMD_ACTION_DEMOTE, 0)

Definition at line 255 of file internal.h.

◆ demoted_action

#define demoted_action (   rsc,
  node,
  optional 
)
Value:
rsc, demoted_key(rsc), CRMD_ACTION_DEMOTED, node, \
optional, TRUE, data_set)

Definition at line 261 of file internal.h.

◆ demoted_key

#define demoted_key (   rsc)    generate_op_key(rsc->id, CRMD_ACTION_DEMOTED, 0)

Definition at line 260 of file internal.h.

◆ dump_node_scores

#define dump_node_scores (   level,
  rsc,
  text,
  nodes 
)
Value:
do { \
dump_node_scores_worker(level, __FILE__, __FUNCTION__, __LINE__, rsc, text, nodes); \
} while(0)

Definition at line 206 of file internal.h.

◆ pe_action_implies

#define pe_action_implies (   action,
  reason,
  flag 
)    pe_action_set_flag_reason(__FUNCTION__, __LINE__, action, reason, NULL, flag, FALSE)

Definition at line 349 of file internal.h.

◆ pe_action_required

#define pe_action_required (   action,
  reason,
  text 
)    pe_action_set_flag_reason(__FUNCTION__, __LINE__, action, reason, text, pe_action_optional, FALSE)

Definition at line 348 of file internal.h.

◆ pe_clear_action_bit

#define pe_clear_action_bit (   action,
  bit 
)    action->flags = crm_clear_bit(__FUNCTION__, __LINE__, action->uuid, action->flags, bit)

Definition at line 26 of file internal.h.

◆ pe_err

#define pe_err (   fmt...)    { was_processing_error = TRUE; crm_config_error = TRUE; crm_err(fmt); }

Definition at line 21 of file internal.h.

◆ pe_proc_err

#define pe_proc_err (   fmt...)    { was_processing_error = TRUE; crm_err(fmt); }

Definition at line 23 of file internal.h.

◆ pe_proc_warn

#define pe_proc_warn (   fmt...)    { was_processing_warning = TRUE; crm_warn(fmt); }

Definition at line 24 of file internal.h.

◆ pe_rsc_debug

#define pe_rsc_debug (   rsc,
  fmt,
  args... 
)    crm_log_tag(LOG_DEBUG, rsc ? rsc->id : "<NULL>", fmt, ##args)

Definition at line 18 of file internal.h.

◆ pe_rsc_info

#define pe_rsc_info (   rsc,
  fmt,
  args... 
)    crm_log_tag(LOG_INFO, rsc ? rsc->id : "<NULL>", fmt, ##args)

Definition at line 17 of file internal.h.

◆ pe_rsc_trace

#define pe_rsc_trace (   rsc,
  fmt,
  args... 
)    crm_log_tag(LOG_TRACE, rsc ? rsc->id : "<NULL>", fmt, ##args)

Definition at line 19 of file internal.h.

◆ pe_set_action_bit

#define pe_set_action_bit (   action,
  bit 
)    action->flags = crm_set_bit(__FUNCTION__, __LINE__, action->uuid, action->flags, bit)

Definition at line 25 of file internal.h.

◆ pe_warn

#define pe_warn (   fmt...)    { was_processing_warning = TRUE; crm_config_warning = TRUE; crm_warn(fmt); }

Definition at line 22 of file internal.h.

◆ promote_action

#define promote_action (   rsc,
  node,
  optional 
)
Value:
rsc, promote_key(rsc), CRMD_ACTION_PROMOTE, node, \
optional, TRUE, data_set)

Definition at line 246 of file internal.h.

◆ promote_key

#define promote_key (   rsc)    generate_op_key(rsc->id, CRMD_ACTION_PROMOTE, 0)

Definition at line 245 of file internal.h.

◆ promoted_action

#define promoted_action (   rsc,
  node,
  optional 
)
Value:
rsc, promoted_key(rsc), CRMD_ACTION_PROMOTED, node, \
optional, TRUE, data_set)

Definition at line 251 of file internal.h.

◆ promoted_key

#define promoted_key (   rsc)    generate_op_key(rsc->id, CRMD_ACTION_PROMOTED, 0)

Definition at line 250 of file internal.h.

◆ reload_key

#define reload_key (   rsc)    generate_op_key(rsc->id, CRMD_ACTION_RELOAD, 0)

Definition at line 234 of file internal.h.

◆ start_action

#define start_action (   rsc,
  node,
  optional 
)
Value:
rsc, start_key(rsc), CRMD_ACTION_START, node, \
optional, TRUE, data_set)

Definition at line 236 of file internal.h.

◆ start_key

#define start_key (   rsc)    generate_op_key(rsc->id, CRMD_ACTION_START, 0)

Definition at line 235 of file internal.h.

◆ started_action

#define started_action (   rsc,
  node,
  optional 
)
Value:
rsc, started_key(rsc), CRMD_ACTION_STARTED, node, \
optional, TRUE, data_set)

Definition at line 241 of file internal.h.

◆ started_key

#define started_key (   rsc)    generate_op_key(rsc->id, CRMD_ACTION_STARTED, 0)

Definition at line 240 of file internal.h.

◆ stop_action

#define stop_action (   rsc,
  node,
  optional 
)
Value:
rsc, stop_key(rsc), CRMD_ACTION_STOP, node, \
optional, TRUE, data_set);

Definition at line 230 of file internal.h.

◆ stop_key

#define stop_key (   rsc)    generate_op_key(rsc->id, CRMD_ACTION_STOP, 0)

Definition at line 229 of file internal.h.

◆ stopped_action

#define stopped_action (   rsc,
  node,
  optional 
)
Value:
rsc, stopped_key(rsc), CRMD_ACTION_STOPPED, node, \
optional, TRUE, data_set);

Definition at line 225 of file internal.h.

◆ stopped_key

#define stopped_key (   rsc)    generate_op_key(rsc->id, CRMD_ACTION_STOPPED, 0)

Definition at line 224 of file internal.h.

Typedef Documentation

◆ notify_data_t

typedef struct notify_data_s notify_data_t

◆ op_digest_cache_t

◆ pe__location_t

◆ pe__ordering_t

Enumeration Type Documentation

◆ pe_fc_flags_e

Enumerator
pe_fc_default 
pe_fc_effective 
pe_fc_fillers 

Definition at line 147 of file internal.h.

◆ rsc_digest_cmp_val

Enumerator
RSC_DIGEST_MATCH 

Digests are the same

RSC_DIGEST_RESTART 

Params that require a restart changed

RSC_DIGEST_ALL 

Some parameter changed.

RSC_DIGEST_UNKNOWN 

rsc op didn't have a digest associated with it, so it is unknown if parameters changed or not.

Definition at line 316 of file internal.h.

Function Documentation

◆ add_hash_param()

void add_hash_param ( GHashTable *  hash,
const char *  name,
const char *  value 
)

Definition at line 412 of file common.c.

◆ add_tag_ref()

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

Definition at line 2405 of file utils.c.

◆ clear_bit_recursive()

void clear_bit_recursive ( resource_t rsc,
unsigned long long  flag 
)

Definition at line 2242 of file utils.c.

◆ clone_active()

gboolean clone_active ( resource_t rsc,
gboolean  all 
)

Definition at line 236 of file clone.c.

◆ clone_free()

void clone_free ( resource_t rsc)

Definition at line 972 of file clone.c.

◆ clone_print()

void clone_print ( resource_t rsc,
const char *  pre_text,
long  options,
void *  print_data 
)

Definition at line 368 of file clone.c.

◆ clone_resource_state()

enum rsc_role_e clone_resource_state ( const resource_t rsc,
gboolean  current 
)

Definition at line 1006 of file clone.c.

◆ clone_strip()

char* clone_strip ( const char *  last_rsc_id)

Definition at line 1539 of file unpack.c.

◆ clone_unpack()

gboolean clone_unpack ( resource_t rsc,
pe_working_set_t data_set 
)

Definition at line 112 of file clone.c.

◆ clone_zero()

char* clone_zero ( const char *  last_rsc_id)

Definition at line 1561 of file unpack.c.

◆ common_free()

void common_free ( resource_t rsc)

Definition at line 778 of file complex.c.

◆ common_print()

void common_print ( resource_t rsc,
const char *  pre_text,
const char *  name,
node_t node,
long  options,
void *  print_data 
)

Definition at line 808 of file native.c.

◆ common_unpack()

gboolean common_unpack ( xmlNode *  xml_obj,
resource_t **  rsc,
resource_t parent,
pe_working_set_t data_set 
)

Definition at line 368 of file complex.c.

◆ common_update_score()

void common_update_score ( resource_t rsc,
const char *  id,
int  score 
)

Definition at line 725 of file complex.c.

◆ custom_action()

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

Definition at line 455 of file utils.c.

◆ destroy_ticket()

void destroy_ticket ( gpointer  data)

Definition at line 1847 of file utils.c.

◆ dump_node_capacity()

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

Definition at line 367 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 283 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 384 of file utils.c.

◆ find_actions()

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

Definition at line 1429 of file utils.c.

◆ find_actions_exact()

GList* find_actions_exact ( GList *  input,
const char *  key,
const pe_node_t on_node 
)

Definition at line 1469 of file utils.c.

◆ find_clone_instance()

resource_t* find_clone_instance ( resource_t rsc,
const char *  sub_id,
pe_working_set_t data_set 
)

Definition at line 42 of file clone.c.

◆ find_first_action()

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

Definition at line 1399 of file utils.c.

◆ find_recurring_actions()

GListPtr find_recurring_actions ( GListPtr  input,
node_t not_on_node 
)

Definition at line 1341 of file utils.c.

◆ find_rsc_op_entry()

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

Definition at line 1261 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 1375 of file utils.c.

◆ get_effective_time()

time_t get_effective_time ( pe_working_set_t data_set)

Definition at line 1727 of file utils.c.

◆ get_pseudo_op()

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

Definition at line 1830 of file utils.c.

◆ get_target_role()

gboolean get_target_role ( resource_t rsc,
enum rsc_role_e role 
)

Definition at line 1742 of file utils.c.

◆ group_active()

gboolean group_active ( resource_t rsc,
gboolean  all 
)

Definition at line 93 of file group.c.

◆ group_free()

void group_free ( resource_t rsc)

Definition at line 258 of file group.c.

◆ group_print()

void group_print ( resource_t rsc,
const char *  pre_text,
long  options,
void *  print_data 
)

Definition at line 138 of file group.c.

◆ group_resource_state()

enum rsc_role_e group_resource_state ( const resource_t rsc,
gboolean  current 
)

Definition at line 279 of file group.c.

◆ group_unpack()

gboolean group_unpack ( resource_t rsc,
pe_working_set_t data_set 
)

Definition at line 22 of file group.c.

◆ is_set_recursive()

bool is_set_recursive ( resource_t rsc,
long long  flag,
bool  any 
)

Definition at line 337 of file clone.c.

◆ merge_weights()

int merge_weights ( int  w1,
int  w2 
)

Definition at line 375 of file common.c.

◆ native_active()

gboolean native_active ( resource_t rsc,
gboolean  all 
)

Definition at line 314 of file native.c.

◆ native_add_running()

void native_add_running ( resource_t rsc,
node_t node,
pe_working_set_t data_set 
)

Definition at line 39 of file native.c.

◆ native_find_rsc()

resource_t* native_find_rsc ( resource_t rsc,
const char *  id,
const node_t node,
int  flags 
)

Definition at line 214 of file native.c.

◆ native_free()

void native_free ( resource_t rsc)

Definition at line 1176 of file native.c.

◆ native_location()

pe_node_t* native_location ( const pe_resource_t rsc,
GList **  list,
int  current 
)

Definition at line 1205 of file native.c.

◆ native_parameter()

char* native_parameter ( resource_t rsc,
node_t node,
gboolean  create,
const char *  name,
pe_working_set_t data_set 
)

Definition at line 269 of file native.c.

◆ native_print()

void native_print ( resource_t rsc,
const char *  pre_text,
long  options,
void *  print_data 
)

Definition at line 1053 of file native.c.

◆ native_resource_state()

enum rsc_role_e native_resource_state ( const resource_t rsc,
gboolean  current 
)

Definition at line 1183 of file native.c.

◆ native_unpack()

gboolean native_unpack ( resource_t rsc,
pe_working_set_t data_set 
)

Definition at line 145 of file native.c.

◆ node_copy()

node_t* node_copy ( const node_t this_node)

Definition at line 132 of file utils.c.

◆ node_hash_dup()

GHashTable* node_hash_dup ( GHashTable *  hash)

Definition at line 286 of file pcmk_sched_native.c.

◆ node_hash_from_list()

GHashTable* node_hash_from_list ( GListPtr  list)

Definition at line 188 of file utils.c.

◆ node_list_dup()

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

Definition at line 205 of file utils.c.

◆ node_list_exclude()

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

Definition at line 153 of file utils.c.

◆ order_actions()

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

Definition at line 1778 of file utils.c.

◆ pe__add_bundle_remote_name()

const char* pe__add_bundle_remote_name ( pe_resource_t rsc,
xmlNode *  xml,
const char *  field 
)

Definition at line 985 of file bundle.c.

◆ pe__add_param_check()

void pe__add_param_check ( xmlNode *  rsc_op,
pe_resource_t rsc,
pe_node_t node,
enum  pe_check_parameters,
pe_working_set_t data_set 
)

Definition at line 215 of file remote.c.

◆ pe__bundle_active()

gboolean pe__bundle_active ( pe_resource_t rsc,
gboolean  all 
)

Definition at line 1363 of file bundle.c.

◆ pe__bundle_html()

int pe__bundle_html ( pcmk__output_t out,
va_list  args 
)

Definition at line 1580 of file bundle.c.

◆ pe__bundle_needs_remote_name()

bool pe__bundle_needs_remote_name ( pe_resource_t rsc)

Definition at line 955 of file bundle.c.

◆ pe__bundle_resource_state()

enum rsc_role_e pe__bundle_resource_state ( const pe_resource_t rsc,
gboolean  current 
)

Definition at line 1891 of file bundle.c.

◆ pe__bundle_text()

int pe__bundle_text ( pcmk__output_t out,
va_list  args 
)

Definition at line 1670 of file bundle.c.

◆ pe__bundle_xml()

int pe__bundle_xml ( pcmk__output_t out,
va_list  args 
)

Definition at line 1498 of file bundle.c.

◆ pe__clear_failcount()

pe_action_t* pe__clear_failcount ( pe_resource_t rsc,
pe_node_t node,
const char *  reason,
pe_working_set_t data_set 
)

Schedule a controller operation to clear a fail count.

Parameters
[in]rscResource with failure
[in]nodeNode failure occurred on
[in]reasonReadable description why needed (for logging)
[in]data_setWorking set for cluster
Returns
Scheduled action

Definition at line 360 of file failcounts.c.

◆ pe__clone_html()

int pe__clone_html ( pcmk__output_t out,
va_list  args 
)

Definition at line 600 of file clone.c.

◆ pe__clone_text()

int pe__clone_text ( pcmk__output_t out,
va_list  args 
)

Definition at line 787 of file clone.c.

◆ pe__clone_xml()

int pe__clone_xml ( pcmk__output_t out,
va_list  args 
)

Definition at line 572 of file clone.c.

◆ pe__common_output_html()

void pe__common_output_html ( pcmk__output_t out,
resource_t rsc,
const char *  name,
node_t node,
long  options 
)

Definition at line 657 of file native.c.

◆ pe__common_output_text()

void pe__common_output_text ( pcmk__output_t out,
resource_t rsc,
const char *  name,
node_t node,
long  options 
)

Definition at line 745 of file native.c.

◆ pe__count_bundle()

void pe__count_bundle ( pe_resource_t rsc)

Definition at line 1918 of file bundle.c.

◆ pe__count_common()

void pe__count_common ( pe_resource_t rsc)

Definition at line 949 of file complex.c.

◆ pe__find_active_on()

pe_node_t* pe__find_active_on ( const pe_resource_t rsc,
unsigned int *  count_all,
unsigned int *  count_clean 
)

Definition at line 860 of file complex.c.

◆ pe__find_active_requires()

pe_node_t* pe__find_active_requires ( const pe_resource_t rsc,
unsigned int *  count 
)

Definition at line 940 of file complex.c.

◆ pe__find_bundle_replica()

pe_resource_t* pe__find_bundle_replica ( const pe_resource_t bundle,
const pe_node_t node 
)

Definition at line 1411 of file bundle.c.

◆ pe__foreach_param_check()

void pe__foreach_param_check ( pe_working_set_t data_set,
void(*)(pe_resource_t *, pe_node_t *, xmlNode *, enum pe_check_parameters, pe_working_set_t *)  cb 
)

Definition at line 241 of file remote.c.

◆ pe__free_bundle()

void pe__free_bundle ( pe_resource_t rsc)

Definition at line 1857 of file bundle.c.

◆ pe__free_param_checks()

void pe__free_param_checks ( pe_working_set_t data_set)

Definition at line 256 of file remote.c.

◆ pe__group_html()

int pe__group_html ( pcmk__output_t out,
va_list  args 
)

Definition at line 212 of file group.c.

◆ pe__group_text()

int pe__group_text ( pcmk__output_t out,
va_list  args 
)

Definition at line 235 of file group.c.

◆ pe__group_xml()

int pe__group_xml ( pcmk__output_t out,
va_list  args 
)

Definition at line 187 of file group.c.

◆ pe__is_universal_clone()

bool pe__is_universal_clone ( pe_resource_t rsc,
pe_working_set_t data_set 
)

Definition at line 1032 of file clone.c.

◆ pe__name_and_nvpairs_xml()

int pe__name_and_nvpairs_xml ( pcmk__output_t out,
bool  is_list,
const char *  tag_name,
size_t  pairs_count,
  ... 
)

Definition at line 15 of file pe_output.c.

◆ pe__output_node()

void pe__output_node ( node_t node,
gboolean  details,
pcmk__output_t out 
)

Definition at line 130 of file pe_output.c.

◆ pe__print_bundle()

void pe__print_bundle ( pe_resource_t rsc,
const char *  pre_text,
long  options,
void *  print_data 
)

Definition at line 1755 of file bundle.c.

◆ pe__register_messages()

void pe__register_messages ( pcmk__output_t out)

Definition at line 125 of file pe_output.c.

◆ pe__resource_actions()

GList* pe__resource_actions ( const pe_resource_t rsc,
const pe_node_t node,
const char *  task,
bool  require_node 
)

Find all actions of given type for a resource.

Parameters
[in]rscResource to search
[in]nodeFind only actions scheduled on this node
[in]taskAction name to search for
[in]require_nodeIf TRUE, NULL node or action node will not match
Returns
List of actions found (or NULL if none)
Note
If node is not NULL and require_node is FALSE, matching actions without a node will be assigned to node.

Definition at line 1518 of file utils.c.

◆ pe__resource_html()

int pe__resource_html ( pcmk__output_t out,
va_list  args 
)

Definition at line 1141 of file native.c.

◆ pe__resource_is_disabled()

bool pe__resource_is_disabled ( pe_resource_t rsc)

Definition at line 2576 of file utils.c.

◆ pe__resource_text()

int pe__resource_text ( pcmk__output_t out,
va_list  args 
)

Definition at line 1158 of file native.c.

◆ pe__resource_xml()

int pe__resource_xml ( pcmk__output_t out,
va_list  args 
)

Definition at line 1074 of file native.c.

◆ pe__rscs_brief_output()

void pe__rscs_brief_output ( pcmk__output_t out,
GListPtr  rsc_list,
long  options,
gboolean  print_all 
)

Definition at line 1412 of file native.c.

◆ pe__shutdown_requested()

bool pe__shutdown_requested ( pe_node_t node)

Definition at line 2529 of file utils.c.

◆ pe__target_rc_from_xml()

int pe__target_rc_from_xml ( xmlNode *  xml_op)

Definition at line 3250 of file unpack.c.

◆ pe__unpack_bundle()

gboolean pe__unpack_bundle ( pe_resource_t rsc,
pe_working_set_t data_set 
)

Definition at line 1024 of file bundle.c.

◆ pe__unpack_dataset_nvpairs()

void pe__unpack_dataset_nvpairs ( xmlNode *  xml_obj,
const char *  set_name,
GHashTable *  node_hash,
GHashTable *  hash,
const char *  always_first,
gboolean  overwrite,
pe_working_set_t data_set 
)

Definition at line 2558 of file utils.c.

◆ pe__update_recheck_time()

void pe__update_recheck_time ( time_t  recheck,
pe_working_set_t data_set 
)

Definition at line 2544 of file utils.c.

◆ pe_action_set_flag_reason()

void pe_action_set_flag_reason ( const char *  function,
long  line,
pe_action_t action,
pe_action_t reason,
const char *  text,
enum pe_action_flags  flags,
bool  overwrite 
)

Definition at line 2441 of file utils.c.

◆ pe_action_set_reason()

void pe_action_set_reason ( pe_action_t action,
const char *  reason,
bool  overwrite 
)

Definition at line 2499 of file utils.c.

◆ pe_base_name_end()

const char* pe_base_name_end ( const char *  id)

Definition at line 1499 of file unpack.c.

◆ pe_can_fence()

bool pe_can_fence ( pe_working_set_t data_set,
node_t node 
)

Definition at line 89 of file utils.c.

◆ pe_create_node()

node_t* pe_create_node ( const char *  id,
const char *  uname,
const char *  type,
const char *  score,
pe_working_set_t data_set 
)

Definition at line 342 of file unpack.c.

◆ pe_fence_node()

void pe_fence_node ( pe_working_set_t data_set,
node_t node,
const char *  reason 
)

Schedule a fence action for a node.

Parameters
[in,out]data_setCurrent working set of cluster
[in,out]nodeNode to fence
[in]reasonText description of why fencing is needed

Definition at line 78 of file unpack.c.

◆ pe_fence_op()

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

Definition at line 2289 of file utils.c.

◆ pe_free_action()

void pe_free_action ( action_t action)

Definition at line 1314 of file utils.c.

◆ pe_get_configured_timeout()

int pe_get_configured_timeout ( resource_t rsc,
const char *  action,
pe_working_set_t data_set 
)

Definition at line 829 of file utils.c.

◆ pe_get_failcount()

int pe_get_failcount ( node_t node,
resource_t rsc,
time_t *  last_failure,
uint32_t  flags,
xmlNode *  xml_op,
pe_working_set_t data_set 
)

Definition at line 251 of file failcounts.c.

◆ pe_metadata()

void pe_metadata ( void  )

Definition at line 172 of file common.c.

◆ pe_node_attribute_calculated()

const char* pe_node_attribute_calculated ( const pe_node_t node,
const char *  name,
const resource_t rsc 
)

Definition at line 429 of file common.c.

◆ pe_node_attribute_raw()

const char* pe_node_attribute_raw ( pe_node_t node,
const char *  name 
)

Definition at line 468 of file common.c.

◆ print_node()

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

Definition at line 1267 of file utils.c.

◆ print_rscs_brief()

void print_rscs_brief ( GListPtr  rsc_list,
const char *  pre_text,
long  options,
void *  print_data,
gboolean  print_all 
)

Definition at line 1332 of file native.c.

◆ print_str_str()

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

Definition at line 1306 of file utils.c.

◆ remote_id_conflict()

bool remote_id_conflict ( const char *  remote_name,
pe_working_set_t data 
)

Definition at line 403 of file unpack.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 1566 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 2050 of file utils.c.

◆ set_bit_recursive()

void set_bit_recursive ( resource_t rsc,
unsigned long long  flag 
)

Definition at line 2255 of file utils.c.

◆ sort_node_uname()

gint sort_node_uname ( gconstpointer  a,
gconstpointer  b 
)

Definition at line 231 of file utils.c.

◆ sort_op_by_callid()

gint sort_op_by_callid ( gconstpointer  a,
gconstpointer  b 
)

Definition at line 1610 of file utils.c.

◆ sort_rsc_index()

gint sort_rsc_index ( gconstpointer  a,
gconstpointer  b 
)

Definition at line 401 of file utils.c.

◆ sort_rsc_priority()

gint sort_rsc_priority ( gconstpointer  a,
gconstpointer  b 
)

Definition at line 428 of file utils.c.

◆ ticket_new()

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

Definition at line 1859 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 2371 of file utils.c.

◆ verify_pe_options()

void verify_pe_options ( GHashTable *  options)

Definition at line 181 of file common.c.

demoted_key
#define demoted_key(rsc)
Definition: internal.h:260
start_key
#define start_key(rsc)
Definition: internal.h:235
delete_key
#define delete_key(rsc)
Definition: internal.h:219
CRMD_ACTION_DEMOTED
#define CRMD_ACTION_DEMOTED
Definition: crm.h:180
CRMD_ACTION_PROMOTED
#define CRMD_ACTION_PROMOTED
Definition: crm.h:178
CRMD_ACTION_STARTED
#define CRMD_ACTION_STARTED
Definition: crm.h:172
CRMD_ACTION_DELETE
#define CRMD_ACTION_DELETE
Definition: crm.h:164
CRMD_ACTION_STOPPED
#define CRMD_ACTION_STOPPED
Definition: crm.h:175
custom_action
action_t * custom_action(resource_t *rsc, char *key, const char *task, node_t *on_node, gboolean optional, gboolean foo, pe_working_set_t *data_set)
Definition: utils.c:455
demote_key
#define demote_key(rsc)
Definition: internal.h:255
stopped_key
#define stopped_key(rsc)
Definition: internal.h:224
CRMD_ACTION_START
#define CRMD_ACTION_START
Definition: crm.h:171
CRMD_ACTION_STOP
#define CRMD_ACTION_STOP
Definition: crm.h:174
promote_key
#define promote_key(rsc)
Definition: internal.h:245
started_key
#define started_key(rsc)
Definition: internal.h:240
promoted_key
#define promoted_key(rsc)
Definition: internal.h:250
CRMD_ACTION_DEMOTE
#define CRMD_ACTION_DEMOTE
Definition: crm.h:179
stop_key
#define stop_key(rsc)
Definition: internal.h:229
CRMD_ACTION_PROMOTE
#define CRMD_ACTION_PROMOTE
Definition: crm.h:177