pacemaker
2.1.4-dc6eb4362
Scalable High-Availability cluster resource manager
|
#include <crm_internal.h>
#include <crm/crm.h>
#include <crm/msg_xml.h>
#include <crm/common/xml.h>
#include <crm/common/xml_internal.h>
#include <crm/common/util.h>
#include <glib.h>
#include <stdbool.h>
#include <crm/pengine/rules.h>
#include <crm/pengine/internal.h>
#include "pe_status_private.h"
Go to the source code of this file.
Macros | |
#define | sort_return(an_int, why) |
Functions | |
void | print_str_str (gpointer key, gpointer value, gpointer user_data) |
gboolean | ghash_free_str_str (gpointer key, gpointer value, gpointer user_data) |
bool | pe_can_fence (pe_working_set_t *data_set, pe_node_t *node) |
pe_node_t * | pe__copy_node (const pe_node_t *this_node) |
void | node_list_exclude (GHashTable *hash, GList *list, gboolean merge_scores) |
GHashTable * | pe__node_list2table (GList *list) |
gint | sort_node_uname (gconstpointer a, gconstpointer b) |
void | pe__show_node_weights_as (const char *file, const char *function, int line, bool to_log, pe_resource_t *rsc, const char *comment, GHashTable *nodes, pe_working_set_t *data_set) |
gint | sort_rsc_index (gconstpointer a, gconstpointer b) |
gint | sort_rsc_priority (gconstpointer a, gconstpointer b) |
pe_action_t * | custom_action (pe_resource_t *rsc, char *key, const char *task, pe_node_t *on_node, gboolean optional, gboolean save_action, pe_working_set_t *data_set) |
Create or update an action object. More... | |
int | pe_get_configured_timeout (pe_resource_t *rsc, const char *action, pe_working_set_t *data_set) |
xmlNode * | find_rsc_op_entry (pe_resource_t *rsc, const char *key) |
void | pe_free_action (pe_action_t *action) |
GList * | find_recurring_actions (GList *input, pe_node_t *not_on_node) |
enum action_tasks | get_complex_task (pe_resource_t *rsc, const char *name, gboolean allow_non_atomic) |
pe_action_t * | find_first_action (GList *input, const char *uuid, const char *task, pe_node_t *on_node) |
GList * | find_actions (GList *input, const char *key, const pe_node_t *on_node) |
GList * | find_actions_exact (GList *input, const char *key, const pe_node_t *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 | resource_location (pe_resource_t *rsc, pe_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 (pe_resource_t *rsc, enum rsc_role_e *role) |
gboolean | order_actions (pe_action_t *lh_action, pe_action_t *rh_action, enum pe_ordering order) |
pe_action_t * | get_pseudo_op (const char *name, pe_working_set_t *data_set) |
void | destroy_ticket (gpointer data) |
pe_ticket_t * | ticket_new (const char *ticket_id, pe_working_set_t *data_set) |
const char * | rsc_printable_id (pe_resource_t *rsc) |
void | pe__clear_resource_flags_recursive (pe_resource_t *rsc, uint64_t flags) |
void | pe__clear_resource_flags_on_all (pe_working_set_t *data_set, uint64_t flag) |
void | pe__set_resource_flags_recursive (pe_resource_t *rsc, uint64_t flags) |
pe_action_t * | pe_fence_op (pe_node_t *node, const char *op, bool optional, const char *reason, bool priority_delay, pe_working_set_t *data_set) |
void | trigger_unfencing (pe_resource_t *rsc, pe_node_t *node, const char *reason, pe_action_t *dependency, pe_working_set_t *data_set) |
gboolean | add_tag_ref (GHashTable *tags, const char *tag_name, const char *obj_ref) |
char * | pe__action2reason (pe_action_t *action, enum pe_action_flags flag) |
void | pe_action_set_reason (pe_action_t *action, const char *reason, bool overwrite) |
bool | pe__shutdown_requested (pe_node_t *node) |
void | pe__update_recheck_time (time_t recheck, pe_working_set_t *data_set) |
void | pe__unpack_dataset_nvpairs (xmlNode *xml_obj, const char *set_name, pe_rule_eval_data_t *rule_data, GHashTable *hash, const char *always_first, gboolean overwrite, pe_working_set_t *data_set) |
bool | pe__resource_is_disabled (pe_resource_t *rsc) |
pe_action_t * | pe__clear_resource_history (pe_resource_t *rsc, pe_node_t *node, pe_working_set_t *data_set) |
bool | pe__rsc_running_on_any (pe_resource_t *rsc, GList *node_list) |
bool | pcmk__rsc_filtered_by_node (pe_resource_t *rsc, GList *only_node) |
GList * | pe__filter_rsc_list (GList *rscs, GList *filter) |
GList * | pe__build_node_name_list (pe_working_set_t *data_set, const char *s) |
GList * | pe__build_rsc_list (pe_working_set_t *data_set, const char *s) |
xmlNode * | pe__failed_probe_for_rsc (pe_resource_t *rsc, const char *name) |
Variables | |
bool | pcmk__is_daemon |
#define sort_return | ( | an_int, | |
why | |||
) |
gboolean add_tag_ref | ( | GHashTable * | tags, |
const char * | tag_name, | ||
const char * | obj_ref | ||
) |
pe_action_t* custom_action | ( | pe_resource_t * | rsc, |
char * | key, | ||
const char * | task, | ||
pe_node_t * | on_node, | ||
gboolean | optional, | ||
gboolean | save_action, | ||
pe_working_set_t * | data_set | ||
) |
Create or update an action object.
[in] | rsc | Resource that action is for (if any) |
[in] | key | Action key (must be non-NULL) |
[in] | task | Action name (must be non-NULL) |
[in] | on_node | Node that action is on (if any) |
[in] | optional | Whether action should be considered optional |
[in] | save_action | Whether action should be recorded in transition graph |
[in] | data_set | Cluster working set |
key
. If save_action
is true, data_set
will own the returned action, otherwise it is the caller's responsibility to free the return value with pe_free_action(). GList* find_actions | ( | GList * | input, |
const char * | key, | ||
const pe_node_t * | on_node | ||
) |
GList* find_actions_exact | ( | GList * | input, |
const char * | key, | ||
const pe_node_t * | on_node | ||
) |
pe_action_t* find_first_action | ( | GList * | input, |
const char * | uuid, | ||
const char * | task, | ||
pe_node_t * | on_node | ||
) |
GList* find_recurring_actions | ( | GList * | input, |
pe_node_t * | not_on_node | ||
) |
xmlNode* find_rsc_op_entry | ( | pe_resource_t * | rsc, |
const char * | key | ||
) |
enum action_tasks get_complex_task | ( | pe_resource_t * | rsc, |
const char * | name, | ||
gboolean | allow_non_atomic | ||
) |
time_t get_effective_time | ( | pe_working_set_t * | data_set | ) |
pe_action_t* get_pseudo_op | ( | const char * | name, |
pe_working_set_t * | data_set | ||
) |
gboolean get_target_role | ( | pe_resource_t * | rsc, |
enum rsc_role_e * | role | ||
) |
gboolean ghash_free_str_str | ( | gpointer | key, |
gpointer | value, | ||
gpointer | user_data | ||
) |
void node_list_exclude | ( | GHashTable * | hash, |
GList * | list, | ||
gboolean | merge_scores | ||
) |
gboolean order_actions | ( | pe_action_t * | lh_action, |
pe_action_t * | rh_action, | ||
enum pe_ordering | order | ||
) |
bool pcmk__rsc_filtered_by_node | ( | pe_resource_t * | rsc, |
GList * | only_node | ||
) |
char* pe__action2reason | ( | pe_action_t * | action, |
enum pe_action_flags | flag | ||
) |
GList* pe__build_node_name_list | ( | pe_working_set_t * | data_set, |
const char * | s | ||
) |
GList* pe__build_rsc_list | ( | pe_working_set_t * | data_set, |
const char * | s | ||
) |
void pe__clear_resource_flags_on_all | ( | pe_working_set_t * | data_set, |
uint64_t | flag | ||
) |
void pe__clear_resource_flags_recursive | ( | pe_resource_t * | rsc, |
uint64_t | flags | ||
) |
pe_action_t* pe__clear_resource_history | ( | pe_resource_t * | rsc, |
pe_node_t * | node, | ||
pe_working_set_t * | data_set | ||
) |
xmlNode* pe__failed_probe_for_rsc | ( | pe_resource_t * | rsc, |
const char * | name | ||
) |
GList* pe__filter_rsc_list | ( | GList * | rscs, |
GList * | filter | ||
) |
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.
[in] | rsc | Resource to search |
[in] | node | Find only actions scheduled on this node |
[in] | task | Action name to search for |
[in] | require_node | If TRUE, NULL node or action node will not match |
bool pe__resource_is_disabled | ( | pe_resource_t * | rsc | ) |
bool pe__rsc_running_on_any | ( | pe_resource_t * | rsc, |
GList * | node_list | ||
) |
void pe__set_resource_flags_recursive | ( | pe_resource_t * | rsc, |
uint64_t | flags | ||
) |
void pe__show_node_weights_as | ( | const char * | file, |
const char * | function, | ||
int | line, | ||
bool | to_log, | ||
pe_resource_t * | rsc, | ||
const char * | comment, | ||
GHashTable * | nodes, | ||
pe_working_set_t * | data_set | ||
) |
void pe__unpack_dataset_nvpairs | ( | xmlNode * | xml_obj, |
const char * | set_name, | ||
pe_rule_eval_data_t * | rule_data, | ||
GHashTable * | hash, | ||
const char * | always_first, | ||
gboolean | overwrite, | ||
pe_working_set_t * | data_set | ||
) |
void pe__update_recheck_time | ( | time_t | recheck, |
pe_working_set_t * | data_set | ||
) |
void pe_action_set_reason | ( | pe_action_t * | action, |
const char * | reason, | ||
bool | overwrite | ||
) |
bool pe_can_fence | ( | pe_working_set_t * | data_set, |
pe_node_t * | node | ||
) |
pe_action_t* pe_fence_op | ( | pe_node_t * | node, |
const char * | op, | ||
bool | optional, | ||
const char * | reason, | ||
bool | priority_delay, | ||
pe_working_set_t * | data_set | ||
) |
void pe_free_action | ( | pe_action_t * | action | ) |
int pe_get_configured_timeout | ( | pe_resource_t * | rsc, |
const char * | action, | ||
pe_working_set_t * | data_set | ||
) |
void print_str_str | ( | gpointer | key, |
gpointer | value, | ||
gpointer | user_data | ||
) |
void resource_location | ( | pe_resource_t * | rsc, |
pe_node_t * | node, | ||
int | score, | ||
const char * | tag, | ||
pe_working_set_t * | data_set | ||
) |
const char* rsc_printable_id | ( | pe_resource_t * | rsc | ) |
gint sort_op_by_callid | ( | gconstpointer | a, |
gconstpointer | b | ||
) |
pe_ticket_t* ticket_new | ( | const char * | ticket_id, |
pe_working_set_t * | data_set | ||
) |
void trigger_unfencing | ( | pe_resource_t * | rsc, |
pe_node_t * | node, | ||
const char * | reason, | ||
pe_action_t * | dependency, | ||
pe_working_set_t * | data_set | ||
) |