11 # define STONITH_NG__H 29 # define T_STONITH_NOTIFY_DISCONNECT "st_notify_disconnect" 30 # define T_STONITH_NOTIFY_FENCE "st_notify_fence" 31 # define T_STONITH_NOTIFY_HISTORY "st_notify_history" 32 # define T_STONITH_NOTIFY_HISTORY_SYNCED "st_notify_history_synced" 90 const char *namespace_s);
191 stonith_t *
st,
int options,
const char *node,
int level);
212 const char *device,
const char *provider,
char **output,
int timeout);
324 const char *callback_name,
348 const char *node,
const char *pattern,
349 const char *attr,
const char *value,
int level);
368 const char *node,
const char *pattern,
369 const char *attr,
const char *value,
391 const char *namespace_s,
const char *agent,
393 char **error_output);
495 # define STONITH_LIBRARY "libstonithd.so.26" 501 stonith_api_kick_helper(uint32_t nodeid,
int timeout,
bool off)
503 static void *st_library = NULL;
506 if (st_library == NULL) {
509 if (st_library && st_kick_fn == NULL) {
510 st_kick_fn = (
st_api_kick_fn) dlsym(st_library,
"stonith_api_kick");
512 if (st_kick_fn == NULL) {
520 return (*st_kick_fn) (nodeid, NULL,
timeout, off);
524 stonith_api_time_helper(uint32_t nodeid,
bool in_progress)
526 static void *st_library = NULL;
529 if (st_library == NULL) {
532 if (st_library && st_time_fn == NULL) {
533 st_time_fn = (
st_api_time_fn) dlsym(st_library,
"stonith_api_time");
535 if (st_time_fn == NULL) {
539 return (*st_time_fn) (nodeid, NULL, in_progress);
560 #ifndef PCMK__NO_COMPAT
struct stonith_history_s * next
int(* register_level_full)(stonith_t *st, int options, const char *node, const char *pattern, const char *attr, const char *value, int level, stonith_key_value_t *device_list)
Register fencing level for specific node, node regex or attribute.
struct stonith_api_operations_s stonith_api_operations_t
struct stonith_key_value_s stonith_key_value_t
int stonith_api_kick(uint32_t nodeid, const char *uname, int timeout, bool off)
int(* query)(stonith_t *st, int options, const char *node, stonith_key_value_t **devices, int timeout)
Retrieve a list of registered stonith devices.
struct stonith_history_s stonith_history_t
enum stonith_namespace stonith_get_namespace(const char *agent, const char *namespace_s)
Determine namespace of a fence agent.
struct stonith_key_value_s * next
int(* register_level)(stonith_t *st, int options, const char *node, int level, stonith_key_value_t *device_list)
Register a fencing level containing the fencing devices to be used at that level for a specific node.
const char * get_stonith_provider(const char *agent, const char *provider)
Deprecated (use stonith_get_namespace() instead)
int(* remove_callback)(stonith_t *st, int call_id, bool all_callbacks)
Remove a registered callback for a given call id.
bool stonith_dispatch(stonith_t *st)
stonith_t * stonith_api_new(void)
int stonith_api_connect_retry(stonith_t *st, const char *name, int max_attempts)
Make a blocking connection attempt to the fencer.
stonith_key_value_t * stonith_key_value_add(stonith_key_value_t *kvp, const char *key, const char *value)
int(* free)(stonith_t *st)
Destroy the stonith api structure.
struct stonith_callback_data_s stonith_callback_data_t
bool stonith_agent_exists(const char *agent, int timeout)
const char * stonith_action_str(const char *action)
Turn stonith action into a more readable string.
time_t(* st_api_time_fn)(int nodeid, const char *uname, bool in_progress)
int(* metadata)(stonith_t *st, int options, const char *device, const char *provider, char **output, int timeout)
Get the metadata documentation for a resource.
int(* register_device)(stonith_t *st, int options, const char *id, const char *provider, const char *agent, stonith_key_value_t *params)
Register a stonith device with the local stonith daemon.
int(* status)(stonith_t *st, int options, const char *id, const char *port, int timeout)
Check to see if a local stonith device's port is reachable.
int(* fence)(stonith_t *st, int options, const char *node, const char *action, int timeout, int tolerance)
Issue a fencing action against a node.
int(* register_callback)(stonith_t *st, int call_id, int timeout, int options, void *userdata, const char *callback_name, void(*callback)(stonith_t *st, stonith_callback_data_t *data))
Register a callback to receive the result of an asynchronous call.
int(* disconnect)(stonith_t *st)
Disconnect from the local stonith daemon.
void stonith_key_value_freeall(stonith_key_value_t *kvp, int keys, int values)
int(* list)(stonith_t *st, int options, const char *id, char **list_output, int timeout)
Retrieve string listing hosts and port assignments from a local stonith device.
int(* list_agents)(stonith_t *stonith, int call_options, const char *provider, stonith_key_value_t **devices, int timeout)
Retrieve a list of installed stonith agents.
void stonith_dump_pending_callbacks(stonith_t *st)
int(* fence_with_delay)(stonith_t *st, int options, const char *node, const char *action, int timeout, int tolerance, int delay)
Issue a fencing action against a node with requested fencing delay.
int(* connect)(stonith_t *st, const char *name, int *stonith_fd)
Connect to the local stonith daemon.
int(* remove_device)(stonith_t *st, int options, const char *name)
Remove a registered stonith device with the local stonith daemon.
int(* register_notification)(stonith_t *st, const char *event, void(*notify)(stonith_t *st, stonith_event_t *e))
int(* monitor)(stonith_t *st, int options, const char *id, int timeout)
Check to see if a local stonith device is reachable.
int(* remove_notification)(stonith_t *st, const char *event)
int(* validate)(stonith_t *st, int call_options, const char *rsc_id, const char *namespace_s, const char *agent, stonith_key_value_t *params, int timeout, char **output, char **error_output)
Validate an arbitrary stonith device configuration.
void stonith_api_delete(stonith_t *st)
int(* remove_level_full)(stonith_t *st, int options, const char *node, const char *pattern, const char *attr, const char *value, int level)
Remove fencing level for specific node, node regex or attribute.
stonith_api_operations_t * cmds
int(* remove_level)(stonith_t *st, int options, const char *node, int level)
Remove a fencing level for a specific node.
void stonith_history_free(stonith_history_t *history)
struct stonith_event_s stonith_event_t
int(* st_api_kick_fn)(int nodeid, const char *uname, int timeout, bool off)
time_t stonith_api_time(uint32_t nodeid, const char *uname, bool in_progress)
int(* confirm)(stonith_t *st, int options, const char *node)
Manually confirm that a node is down.
enum stonith_namespace stonith_text2namespace(const char *namespace_s)
Get agent namespace by name.
const char * stonith_namespace2text(enum stonith_namespace st_namespace)
Get agent namespace name.
int(* history)(stonith_t *st, int options, const char *node, stonith_history_t **output, int timeout)
Retrieve a list of fencing operations that have occurred for a specific node.