10 #ifndef STONITH_NG_INTERNAL__H 11 # define STONITH_NG_INTERNAL__H 28 #define stonith__set_device_flags(device_flags, device_id, flags_to_set) do { \ 29 device_flags = pcmk__set_flags_as(__func__, __LINE__, LOG_TRACE, \ 30 "Fence device", device_id, \ 31 (device_flags), (flags_to_set), \ 35 #define stonith__set_call_options(st_call_opts, call_for, flags_to_set) do { \ 36 st_call_opts = pcmk__set_flags_as(__func__, __LINE__, LOG_TRACE, \ 37 "Fencer call", (call_for), \ 38 (st_call_opts), (flags_to_set), \ 42 #define stonith__clear_call_options(st_call_opts, call_for, flags_to_clear) do { \ 43 st_call_opts = pcmk__clear_flags_as(__func__, __LINE__, LOG_TRACE, \ 44 "Fencer call", (call_for), \ 45 (st_call_opts), (flags_to_clear), \ 49 struct stonith_action_s;
55 uint32_t victim_nodeid,
57 GHashTable * device_args,
58 GHashTable * port_map,
59 const char * host_arg);
70 void (*done) (
int pid,
73 void (*fork_cb) (
int pid,
void *user_data));
76 const char *attr,
const char *value,
84 const char *rsc_provides);
94 const char *device_name,
97 # define ST_LEVEL_MAX 10 99 # define F_STONITH_CLIENTID "st_clientid" 100 # define F_STONITH_CALLOPTS "st_callopt" 101 # define F_STONITH_CALLID "st_callid" 102 # define F_STONITH_CALLDATA "st_calldata" 103 # define F_STONITH_OPERATION "st_op" 104 # define F_STONITH_TARGET "st_target" 105 # define F_STONITH_REMOTE_OP_ID "st_remote_op" 106 # define F_STONITH_REMOTE_OP_ID_RELAY "st_remote_op_relay" 107 # define F_STONITH_RC "st_rc" 108 # define F_STONITH_OUTPUT "st_output" 110 # define F_STONITH_TIMEOUT "st_timeout" 111 # define F_STONITH_TOLERANCE "st_tolerance" 112 # define F_STONITH_DELAY "st_delay" 114 # define F_STONITH_ACTION_TIMEOUT "st_action_timeout" 116 # define F_STONITH_ACTION_DISALLOWED "st_action_disallowed" 118 # define F_STONITH_DELAY_MAX "st_delay_max" 120 # define F_STONITH_DELAY_BASE "st_delay_base" 123 # define F_STONITH_DEVICE_VERIFIED "st_monitor_verified" 125 # define F_STONITH_DEVICE_REQUIRED "st_required" 127 # define F_STONITH_AVAILABLE_DEVICES "st-available-devices" 128 # define F_STONITH_CALLBACK_TOKEN "st_async_id" 129 # define F_STONITH_CLIENTNAME "st_clientname" 130 # define F_STONITH_CLIENTNODE "st_clientnode" 131 # define F_STONITH_NOTIFY_ACTIVATE "st_notify_activate" 132 # define F_STONITH_NOTIFY_DEACTIVATE "st_notify_deactivate" 133 # define F_STONITH_DELEGATE "st_delegate" 138 # define F_STONITH_ORIGIN "st_origin" 139 # define F_STONITH_HISTORY_LIST "st_history" 140 # define F_STONITH_DATE "st_date" 141 # define F_STONITH_DATE_NSEC "st_date_nsec" 142 # define F_STONITH_STATE "st_state" 143 # define F_STONITH_ACTIVE "st_active" 144 # define F_STONITH_DIFFERENTIAL "st_differential" 146 # define F_STONITH_DEVICE "st_device_id" 147 # define F_STONITH_ACTION "st_device_action" 148 # define F_STONITH_MERGED "st_op_merged" 150 # define T_STONITH_NG "stonith-ng" 151 # define T_STONITH_REPLY "st-reply" 155 # define T_STONITH_TIMEOUT_VALUE "st-async-timeout-value" 156 # define T_STONITH_NOTIFY "st_notify" 158 # define STONITH_ATTR_ACTION_OP "action" 160 # define STONITH_OP_EXEC "st_execute" 161 # define STONITH_OP_TIMEOUT_UPDATE "st_timeout_update" 162 # define STONITH_OP_QUERY "st_query" 163 # define STONITH_OP_FENCE "st_fence" 164 # define STONITH_OP_RELAY "st_relay" 165 # define STONITH_OP_DEVICE_ADD "st_device_register" 166 # define STONITH_OP_DEVICE_DEL "st_device_remove" 167 # define STONITH_OP_FENCE_HISTORY "st_fence_history" 168 # define STONITH_OP_LEVEL_ADD "st_level_add" 169 # define STONITH_OP_LEVEL_DEL "st_level_remove" 171 # define STONITH_WATCHDOG_AGENT "fence_watchdog" 173 # define STONITH_WATCHDOG_AGENT_INTERNAL "#watchdog" 174 # define STONITH_WATCHDOG_ID "watchdog" 209 stonith__op_state_pending(
enum op_state state)
void stonith__destroy_action(stonith_action_t *action)
struct stonith_action_s stonith_action_t
stonith_history_t * stonith__first_matching_event(stonith_history_t *history, bool(*matching_fn)(stonith_history_t *, void *), void *user_data)
int stonith__legacy2status(int rc)
void stonith__register_messages(pcmk__output_t *out)
int stonith__event_exit_status(stonith_event_t *event)
xmlNode * create_level_registration_xml(const char *node, const char *pattern, const char *attr, const char *value, int level, stonith_key_value_t *device_list)
stonith_history_t * stonith__sort_history(stonith_history_t *history)
int stonith__full_history(pcmk__output_t *out, va_list args)
int stonith__result2rc(const pcmk__action_result_t *result)
stonith_action_t * stonith_action_create(const char *agent, const char *_action, const char *victim, uint32_t victim_nodeid, int timeout, GHashTable *device_args, GHashTable *port_map, const char *host_arg)
gboolean stonith__watchdog_fencing_enabled_for_node_api(stonith_t *st, const char *node)
bool stonith__event_state_pending(stonith_history_t *history, void *user_data)
GList * stonith__parse_targets(const char *hosts)
const char * stonith__exit_reason(stonith_callback_data_t *data)
Formatted output for pacemaker tools.
void stonith__xe_get_result(xmlNode *xml, pcmk__action_result_t *result)
void stonith__device_parameter_flags(uint32_t *device_flags, const char *device_name, xmlNode *metadata)
pcmk__action_result_t * stonith__action_result(stonith_action_t *action)
const char * stonith__event_exit_reason(stonith_event_t *event)
gboolean stonith__later_succeeded(stonith_history_t *event, stonith_history_t *top_history)
Wrappers for and extensions to libxml2.
int stonith__history(pcmk__output_t *out, va_list args)
void stonith__xe_set_result(xmlNode *xml, const pcmk__action_result_t *result)
char * stonith__event_description(stonith_event_t *event)
pcmk__action_result_t result
int stonith__execution_status(stonith_callback_data_t *data)
gboolean stonith__watchdog_fencing_enabled_for_node(const char *node)
xmlNode * stonith__find_xe_with_result(xmlNode *xml)
This structure contains everything that makes up a single output formatter.
int stonith__failed_history(pcmk__output_t *out, va_list args)
int stonith_action_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))
IPC interface to Pacemaker daemons.
int stonith__exit_status(stonith_callback_data_t *data)
int stonith__pending_actions(pcmk__output_t *out, va_list args)
int stonith__event_execution_status(stonith_event_t *event)
bool stonith__event_state_eq(stonith_history_t *history, void *user_data)
xmlNode * create_device_registration_xml(const char *id, enum stonith_namespace namespace, const char *agent, stonith_key_value_t *params, const char *rsc_provides)
bool stonith__event_state_neq(stonith_history_t *history, void *user_data)