 |
pacemaker
2.0.4-2deceaa3ae
Scalable High-Availability cluster resource manager
|
Go to the documentation of this file.
10 #ifndef STONITH_NG_INTERNAL__H
11 # define STONITH_NG_INTERNAL__H
27 struct stonith_action_s;
33 uint32_t victim_nodeid,
35 GHashTable * device_args,
36 GHashTable * port_map,
37 const char * host_arg);
45 void (*done) (GPid
pid,
int rc,
const char *output,
47 void (*fork_cb) (GPid
pid, gpointer user_data));
52 const char *attr,
const char *value,
60 const char *rsc_provides);
71 # define ST_LEVEL_MAX 10
73 # define F_STONITH_CLIENTID "st_clientid"
74 # define F_STONITH_CALLOPTS "st_callopt"
75 # define F_STONITH_CALLID "st_callid"
76 # define F_STONITH_CALLDATA "st_calldata"
77 # define F_STONITH_OPERATION "st_op"
78 # define F_STONITH_TARGET "st_target"
79 # define F_STONITH_REMOTE_OP_ID "st_remote_op"
80 # define F_STONITH_REMOTE_OP_ID_RELAY "st_remote_op_relay"
81 # define F_STONITH_RC "st_rc"
83 # define F_STONITH_TIMEOUT "st_timeout"
84 # define F_STONITH_TOLERANCE "st_tolerance"
85 # define F_STONITH_DELAY "st_delay"
87 # define F_STONITH_ACTION_TIMEOUT "st_action_timeout"
89 # define F_STONITH_ACTION_DISALLOWED "st_action_disallowed"
91 # define F_STONITH_DELAY_MAX "st_delay_max"
93 # define F_STONITH_DELAY_BASE "st_delay_base"
96 # define F_STONITH_DEVICE_VERIFIED "st_monitor_verified"
98 # define F_STONITH_DEVICE_REQUIRED "st_required"
100 # define F_STONITH_AVAILABLE_DEVICES "st-available-devices"
101 # define F_STONITH_CALLBACK_TOKEN "st_async_id"
102 # define F_STONITH_CLIENTNAME "st_clientname"
103 # define F_STONITH_CLIENTNODE "st_clientnode"
104 # define F_STONITH_NOTIFY_ACTIVATE "st_notify_activate"
105 # define F_STONITH_NOTIFY_DEACTIVATE "st_notify_deactivate"
106 # define F_STONITH_DELEGATE "st_delegate"
111 # define F_STONITH_ORIGIN "st_origin"
112 # define F_STONITH_HISTORY_LIST "st_history"
113 # define F_STONITH_DATE "st_date"
114 # define F_STONITH_STATE "st_state"
115 # define F_STONITH_ACTIVE "st_active"
116 # define F_STONITH_DIFFERENTIAL "st_differential"
118 # define F_STONITH_DEVICE "st_device_id"
119 # define F_STONITH_ACTION "st_device_action"
120 # define F_STONITH_MODE "st_mode"
121 # define F_STONITH_MERGED "st_op_merged"
123 # define T_STONITH_NG "stonith-ng"
124 # define T_STONITH_REPLY "st-reply"
128 # define T_STONITH_TIMEOUT_VALUE "st-async-timeout-value"
129 # define T_STONITH_NOTIFY "st_notify"
131 # define STONITH_ATTR_HOSTARG "pcmk_host_argument"
132 # define STONITH_ATTR_HOSTMAP "pcmk_host_map"
133 # define STONITH_ATTR_HOSTLIST "pcmk_host_list"
134 # define STONITH_ATTR_HOSTCHECK "pcmk_host_check"
135 # define STONITH_ATTR_DELAY_MAX "pcmk_delay_max"
136 # define STONITH_ATTR_DELAY_BASE "pcmk_delay_base"
137 # define STONITH_ATTR_ACTION_LIMIT "pcmk_action_limit"
139 # define STONITH_ATTR_ACTION_OP "action"
141 # define STONITH_OP_EXEC "st_execute"
142 # define STONITH_OP_TIMEOUT_UPDATE "st_timeout_update"
143 # define STONITH_OP_QUERY "st_query"
144 # define STONITH_OP_FENCE "st_fence"
145 # define STONITH_OP_RELAY "st_relay"
146 # define STONITH_OP_DEVICE_ADD "st_device_register"
147 # define STONITH_OP_DEVICE_DEL "st_device_remove"
148 # define STONITH_OP_FENCE_HISTORY "st_fence_history"
149 # define STONITH_OP_LEVEL_ADD "st_level_add"
150 # define STONITH_OP_LEVEL_DEL "st_level_remove"
152 # define STONITH_WATCHDOG_AGENT "#watchdog"
154 # ifdef HAVE_STONITH_STONITH_H
160 const char *agent, GHashTable *params,
161 int timeout,
char **output,
char **error_output);
169 const char *agent, GHashTable *params,
const char *host_arg,
170 int timeout,
char **output,
char **error_output);
int stonith__full_history_xml(pcmk__output_t *out, va_list args)
int stonith__execute(stonith_action_t *action)
int stonith__rhcs_validate(stonith_t *st, int call_options, const char *target, const char *agent, GHashTable *params, const char *host_arg, int timeout, char **output, char **error_output)
long long stonith__device_parameter_flags(xmlNode *metadata)
void stonith__action_result(stonith_action_t *action, int *rc, char **output, char **error_output)
@ st_device_supports_reboot
@ st_device_supports_list
int stonith__last_fenced_xml(pcmk__output_t *out, va_list args)
int stonith__lha_validate(stonith_t *st, int call_options, const char *target, const char *agent, GHashTable *params, int timeout, char **output, char **error_output)
int stonith__event_html(pcmk__output_t *out, va_list args)
int stonith__full_history(pcmk__output_t *out, va_list args)
int stonith__list_lha_agents(stonith_key_value_t **devices)
GList * stonith__parse_targets(const char *hosts)
int stonith__lha_metadata(const char *agent, int timeout, char **output)
Wrappers for and extensions to libxml2.
int stonith__history(pcmk__output_t *out, va_list args)
int stonith__validate_agent_xml(pcmk__output_t *out, va_list args)
xmlNode * create_device_registration_xml(const char *id, enum stonith_namespace namespace, const char *agent, stonith_key_value_t *params, const char *rsc_provides)
int stonith_action_execute_async(stonith_action_t *action, void *userdata, void(*done)(GPid pid, int rc, const char *output, gpointer user_data), void(*fork_cb)(GPid pid, gpointer user_data))
stonith_history_t * stonith__sort_history(stonith_history_t *history)
int stonith__last_fenced_html(pcmk__output_t *out, va_list args)
int stonith__last_fenced_text(pcmk__output_t *out, va_list args)
void stonith__destroy_action(stonith_action_t *action)
int stonith__list_rhcs_agents(stonith_key_value_t **devices)
Wrappers for and extensions to libqb IPC.
gboolean stonith__later_succeeded(stonith_history_t *event, stonith_history_t *top_history)
int stonith__validate_agent_html(pcmk__output_t *out, va_list args)
bool stonith__agent_is_rhcs(const char *agent)
This structure contains everything that makes up a single output formatter.
int stonith__failed_history(pcmk__output_t *out, va_list args)
int stonith__event_text(pcmk__output_t *out, va_list args)
int stonith__event_xml(pcmk__output_t *out, va_list args)
void stonith__register_messages(pcmk__output_t *out)
@ st_device_supports_parameter_port
int stonith__validate_agent_text(pcmk__output_t *out, va_list args)
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)
int stonith__rhcs_metadata(const char *agent, int timeout, char **output)
Execute RHCS-compatible agent's meta-data action.
@ st_device_supports_parameter_plug
@ st_device_supports_status
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)
bool stonith__agent_is_lha(const char *agent)
Determine namespace of a fence agent.
int stonith__pending_actions(pcmk__output_t *out, va_list args)
struct stonith_action_s stonith_action_t
Formatted output for pacemaker tools.