pacemaker 3.0.1-16e74fc4da
Scalable High-Availability cluster resource manager
Loading...
Searching...
No Matches
internal.h File Reference
#include <stdbool.h>
#include <glib.h>
#include <crm/common/ipc.h>
#include <crm/common/xml.h>
#include <crm/common/output_internal.h>
#include <crm/common/results_internal.h>
#include <crm/stonith-ng.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.

Macros

#define stonith__set_call_options(st_call_opts, call_for, flags_to_set)
 
#define stonith__clear_call_options(st_call_opts, call_for, flags_to_clear)
 
#define ST__LEVEL_COUNT   10
 
#define STONITH_ATTR_ACTION_OP   "action"
 
#define STONITH_OP_EXEC   "st_execute"
 
#define STONITH_OP_TIMEOUT_UPDATE   "st_timeout_update"
 
#define STONITH_OP_QUERY   "st_query"
 
#define STONITH_OP_FENCE   "st_fence"
 
#define STONITH_OP_RELAY   "st_relay"
 
#define STONITH_OP_DEVICE_ADD   "st_device_register"
 
#define STONITH_OP_DEVICE_DEL   "st_device_remove"
 
#define STONITH_OP_FENCE_HISTORY   "st_fence_history"
 
#define STONITH_OP_LEVEL_ADD   "st_level_add"
 
#define STONITH_OP_LEVEL_DEL   "st_level_remove"
 
#define STONITH_OP_NOTIFY   "st_notify"
 
#define STONITH_OP_POKE   "poke"
 
#define STONITH_WATCHDOG_AGENT   "fence_watchdog"
 
#define STONITH_WATCHDOG_AGENT_INTERNAL   "#watchdog"
 
#define STONITH_WATCHDOG_ID   "watchdog"
 

Typedefs

typedef struct stonith_action_s stonith_action_t
 

Functions

stonith_tstonith__api_new (void)
 
void stonith__api_free (stonith_t *stonith_api)
 
int stonith__api_dispatch (stonith_t *stonith_api)
 
int stonith__api_connect_retry (stonith_t *stonith, const char *name, int max_attempts)
 
bool stonith__agent_exists (const char *name)
 
stonith_key_value_tstonith__key_value_add (stonith_key_value_t *head, const char *key, const char *value)
 
void stonith__key_value_freeall (stonith_key_value_t *head, bool keys, bool values)
 
stonith_action_tstonith__action_create (const char *agent, const char *action_name, const char *target, int timeout_sec, GHashTable *device_args, GHashTable *port_map, const char *host_arg)
 
void stonith__destroy_action (stonith_action_t *action)
 
pcmk__action_result_tstonith__action_result (stonith_action_t *action)
 
int stonith__result2rc (const pcmk__action_result_t *result)
 
void stonith__xe_set_result (xmlNode *xml, const pcmk__action_result_t *result)
 
void stonith__xe_get_result (const xmlNode *xml, pcmk__action_result_t *result)
 
xmlNode * stonith__find_xe_with_result (xmlNode *xml)
 
int stonith__execute_async (stonith_action_t *action, void *userdata, void(*done)(int pid, const pcmk__action_result_t *result, void *user_data), void(*fork_cb)(int pid, void *user_data))
 
int stonith__metadata_async (const char *agent, int timeout_sec, void(*callback)(int pid, const pcmk__action_result_t *result, void *user_data), void *user_data)
 
xmlNode * create_level_registration_xml (const char *node, const char *pattern, const char *attr, const char *value, int level, const stonith_key_value_t *device_list)
 
xmlNode * create_device_registration_xml (const char *id, enum stonith_namespace standard, const char *agent, const stonith_key_value_t *params, const char *rsc_provides)
 
void stonith__register_messages (pcmk__output_t *out)
 
GList * stonith__parse_targets (const char *hosts)
 
void stonith__history_free (stonith_history_t *head)
 
const char * stonith__later_succeeded (const stonith_history_t *event, const stonith_history_t *top_history)
 
stonith_history_tstonith__sort_history (stonith_history_t *history)
 
const char * stonith__default_host_arg (xmlNode *metadata)
 
stonith_history_tstonith__first_matching_event (stonith_history_t *history, bool(*matching_fn)(stonith_history_t *, void *), void *user_data)
 
bool stonith__event_state_pending (stonith_history_t *history, void *user_data)
 
bool stonith__event_state_eq (stonith_history_t *history, void *user_data)
 
bool stonith__event_state_neq (stonith_history_t *history, void *user_data)
 
int stonith__legacy2status (int rc)
 
int stonith__exit_status (const stonith_callback_data_t *data)
 
int stonith__execution_status (const stonith_callback_data_t *data)
 
const char * stonith__exit_reason (const stonith_callback_data_t *data)
 
int stonith__event_exit_status (const stonith_event_t *event)
 
int stonith__event_execution_status (const stonith_event_t *event)
 
const char * stonith__event_exit_reason (const stonith_event_t *event)
 
char * stonith__event_description (const stonith_event_t *event)
 
gchar * stonith__history_description (const stonith_history_t *event, bool full_history, const char *later_succeeded, uint32_t show_opts)
 
const char * stonith__op_state_text (enum op_state state)
 
gboolean stonith__watchdog_fencing_enabled_for_node (const char *node)
 
gboolean stonith__watchdog_fencing_enabled_for_node_api (stonith_t *st, const char *node)
 
int stonith__validate (stonith_t *st, int call_options, const char *rsc_id, const char *agent, GHashTable *params, int timeout_sec, char **output, char **error_output)
 

Macro Definition Documentation

◆ ST__LEVEL_COUNT

#define ST__LEVEL_COUNT   10

Definition at line 109 of file internal.h.

◆ stonith__clear_call_options

#define stonith__clear_call_options ( st_call_opts,
call_for,
flags_to_clear )
Value:
do { \
st_call_opts = pcmk__clear_flags_as(__func__, __LINE__, LOG_TRACE, \
"Fencer call", (call_for), \
(st_call_opts), (flags_to_clear), \
#flags_to_clear); \
} while (0)
#define LOG_TRACE
Definition logging.h:38

Definition at line 47 of file internal.h.

◆ stonith__set_call_options

#define stonith__set_call_options ( st_call_opts,
call_for,
flags_to_set )
Value:
do { \
st_call_opts = pcmk__set_flags_as(__func__, __LINE__, LOG_TRACE, \
"Fencer call", (call_for), \
(st_call_opts), (flags_to_set), \
#flags_to_set); \
} while (0)

Definition at line 40 of file internal.h.

◆ STONITH_ATTR_ACTION_OP

#define STONITH_ATTR_ACTION_OP   "action"

Definition at line 111 of file internal.h.

◆ STONITH_OP_DEVICE_ADD

#define STONITH_OP_DEVICE_ADD   "st_device_register"

Definition at line 118 of file internal.h.

◆ STONITH_OP_DEVICE_DEL

#define STONITH_OP_DEVICE_DEL   "st_device_remove"

Definition at line 119 of file internal.h.

◆ STONITH_OP_EXEC

#define STONITH_OP_EXEC   "st_execute"

Definition at line 113 of file internal.h.

◆ STONITH_OP_FENCE

#define STONITH_OP_FENCE   "st_fence"

Definition at line 116 of file internal.h.

◆ STONITH_OP_FENCE_HISTORY

#define STONITH_OP_FENCE_HISTORY   "st_fence_history"

Definition at line 120 of file internal.h.

◆ STONITH_OP_LEVEL_ADD

#define STONITH_OP_LEVEL_ADD   "st_level_add"

Definition at line 121 of file internal.h.

◆ STONITH_OP_LEVEL_DEL

#define STONITH_OP_LEVEL_DEL   "st_level_remove"

Definition at line 122 of file internal.h.

◆ STONITH_OP_NOTIFY

#define STONITH_OP_NOTIFY   "st_notify"

Definition at line 123 of file internal.h.

◆ STONITH_OP_POKE

#define STONITH_OP_POKE   "poke"

Definition at line 124 of file internal.h.

◆ STONITH_OP_QUERY

#define STONITH_OP_QUERY   "st_query"

Definition at line 115 of file internal.h.

◆ STONITH_OP_RELAY

#define STONITH_OP_RELAY   "st_relay"

Definition at line 117 of file internal.h.

◆ STONITH_OP_TIMEOUT_UPDATE

#define STONITH_OP_TIMEOUT_UPDATE   "st_timeout_update"

Definition at line 114 of file internal.h.

◆ STONITH_WATCHDOG_AGENT

#define STONITH_WATCHDOG_AGENT   "fence_watchdog"

Definition at line 127 of file internal.h.

◆ STONITH_WATCHDOG_AGENT_INTERNAL

#define STONITH_WATCHDOG_AGENT_INTERNAL   "#watchdog"

Definition at line 129 of file internal.h.

◆ STONITH_WATCHDOG_ID

#define STONITH_WATCHDOG_ID   "watchdog"

Definition at line 130 of file internal.h.

Typedef Documentation

◆ stonith_action_t

typedef struct stonith_action_s stonith_action_t

Definition at line 55 of file internal.h.

Function Documentation

◆ create_device_registration_xml()

xmlNode * create_device_registration_xml ( const char * id,
enum stonith_namespace standard,
const char * agent,
const stonith_key_value_t * params,
const char * rsc_provides )

Definition at line 303 of file st_client.c.

◆ create_level_registration_xml()

xmlNode * create_level_registration_xml ( const char * node,
const char * pattern,
const char * attr,
const char * value,
int level,
const stonith_key_value_t * device_list )

Definition at line 425 of file st_client.c.

◆ stonith__action_create()

stonith_action_t * stonith__action_create ( const char * agent,
const char * action_name,
const char * target,
int timeout_sec,
GHashTable * device_args,
GHashTable * port_map,
const char * host_arg )

Definition at line 253 of file st_actions.c.

◆ stonith__action_result()

pcmk__action_result_t * stonith__action_result ( stonith_action_t * action)

Definition at line 231 of file st_actions.c.

◆ stonith__agent_exists()

bool stonith__agent_exists ( const char * name)

Definition at line 2168 of file st_client.c.

◆ stonith__api_connect_retry()

int stonith__api_connect_retry ( stonith_t * stonith,
const char * name,
int max_attempts )

Definition at line 1958 of file st_client.c.

◆ stonith__api_dispatch()

int stonith__api_dispatch ( stonith_t * stonith_api)

Definition at line 1677 of file st_client.c.

◆ stonith__api_free()

void stonith__api_free ( stonith_t * stonith_api)

Definition at line 1939 of file st_client.c.

◆ stonith__api_new()

stonith_t * stonith__api_new ( void )

Definition at line 1866 of file st_client.c.

◆ stonith__default_host_arg()

const char * stonith__default_host_arg ( xmlNode * metadata)

Definition at line 2529 of file st_client.c.

◆ stonith__destroy_action()

void stonith__destroy_action ( stonith_action_t * action)

Definition at line 206 of file st_actions.c.

◆ stonith__event_description()

char * stonith__event_description ( const stonith_event_t * event)

Definition at line 2746 of file st_client.c.

◆ stonith__event_execution_status()

int stonith__event_execution_status ( const stonith_event_t * event)

Definition at line 2704 of file st_client.c.

◆ stonith__event_exit_reason()

const char * stonith__event_exit_reason ( const stonith_event_t * event)

Definition at line 2724 of file st_client.c.

◆ stonith__event_exit_status()

int stonith__event_exit_status ( const stonith_event_t * event)

Definition at line 2684 of file st_client.c.

◆ stonith__event_state_eq()

bool stonith__event_state_eq ( stonith_history_t * history,
void * user_data )

Definition at line 2482 of file st_client.c.

◆ stonith__event_state_neq()

bool stonith__event_state_neq ( stonith_history_t * history,
void * user_data )

Definition at line 2488 of file st_client.c.

◆ stonith__event_state_pending()

bool stonith__event_state_pending ( stonith_history_t * history,
void * user_data )

Definition at line 2476 of file st_client.c.

◆ stonith__execute_async()

int stonith__execute_async ( stonith_action_t * action,
void * userdata,
void(* done )(int pid, const pcmk__action_result_t *result, void *user_data),
void(* fork_cb )(int pid, void *user_data) )

Definition at line 679 of file st_actions.c.

◆ stonith__execution_status()

int stonith__execution_status ( const stonith_callback_data_t * data)

Definition at line 2650 of file st_client.c.

◆ stonith__exit_reason()

const char * stonith__exit_reason ( const stonith_callback_data_t * data)

Definition at line 2667 of file st_client.c.

◆ stonith__exit_status()

int stonith__exit_status ( const stonith_callback_data_t * data)

Definition at line 2633 of file st_client.c.

◆ stonith__find_xe_with_result()

xmlNode * stonith__find_xe_with_result ( xmlNode * xml)

Definition at line 459 of file st_actions.c.

◆ stonith__first_matching_event()

stonith_history_t * stonith__first_matching_event ( stonith_history_t * history,
bool(* matching_fn )(stonith_history_t *, void *),
void * user_data )

Definition at line 2462 of file st_client.c.

◆ stonith__history_description()

gchar * stonith__history_description ( const stonith_history_t * event,
bool full_history,
const char * later_succeeded,
uint32_t show_opts )

Definition at line 109 of file st_output.c.

◆ stonith__history_free()

void stonith__history_free ( stonith_history_t * head)

Definition at line 776 of file st_client.c.

◆ stonith__key_value_add()

stonith_key_value_t * stonith__key_value_add ( stonith_key_value_t * head,
const char * key,
const char * value )

Definition at line 1995 of file st_client.c.

◆ stonith__key_value_freeall()

void stonith__key_value_freeall ( stonith_key_value_t * head,
bool keys,
bool values )

Definition at line 2033 of file st_client.c.

◆ stonith__later_succeeded()

const char * stonith__later_succeeded ( const stonith_history_t * event,
const stonith_history_t * top_history )

Definition at line 2347 of file st_client.c.

◆ stonith__legacy2status()

int stonith__legacy2status ( int rc)

Definition at line 390 of file st_actions.c.

◆ stonith__metadata_async()

int stonith__metadata_async ( const char * agent,
int timeout_sec,
void(* callback )(int pid, const pcmk__action_result_t *result, void *user_data),
void * user_data )

Definition at line 2562 of file st_client.c.

◆ stonith__op_state_text()

const char * stonith__op_state_text ( enum op_state state)

Definition at line 2442 of file st_client.c.

◆ stonith__parse_targets()

GList * stonith__parse_targets ( const char * hosts)

Definition at line 2300 of file st_client.c.

◆ stonith__register_messages()

void stonith__register_messages ( pcmk__output_t * out)

Definition at line 623 of file st_output.c.

◆ stonith__result2rc()

int stonith__result2rc ( const pcmk__action_result_t * result)

Definition at line 316 of file st_actions.c.

◆ stonith__sort_history()

stonith_history_t * stonith__sort_history ( stonith_history_t * history)

Definition at line 2387 of file st_client.c.

◆ stonith__validate()

int stonith__validate ( stonith_t * st,
int call_options,
const char * rsc_id,
const char * agent,
GHashTable * params,
int timeout_sec,
char ** output,
char ** error_output )

Definition at line 1742 of file st_client.c.

◆ stonith__watchdog_fencing_enabled_for_node()

gboolean stonith__watchdog_fencing_enabled_for_node ( const char * node)

Definition at line 241 of file st_client.c.

◆ stonith__watchdog_fencing_enabled_for_node_api()

gboolean stonith__watchdog_fencing_enabled_for_node_api ( stonith_t * st,
const char * node )

Definition at line 182 of file st_client.c.

◆ stonith__xe_get_result()

void stonith__xe_get_result ( const xmlNode * xml,
pcmk__action_result_t * result )

Definition at line 483 of file st_actions.c.

◆ stonith__xe_set_result()

void stonith__xe_set_result ( xmlNode * xml,
const pcmk__action_result_t * result )

Definition at line 420 of file st_actions.c.