pacemaker  2.1.4-dc6eb4362
Scalable High-Availability cluster resource manager
Data Fields
stonith_api_operations_s Struct Reference

#include <include/crm/stonith-ng.h>

Data Fields

int(* free )(stonith_t *st)
 Destroy the stonith api structure. More...
 
int(* connect )(stonith_t *st, const char *name, int *stonith_fd)
 Connect to the local stonith daemon. More...
 
int(* disconnect )(stonith_t *st)
 Disconnect from the local stonith daemon. More...
 
int(* remove_device )(stonith_t *st, int options, const char *name)
 Unregister a fence device with the local fencer. More...
 
int(* register_device )(stonith_t *st, int options, const char *id, const char *provider, const char *agent, stonith_key_value_t *params)
 Register a fence device with the local fencer. More...
 
int(* remove_level )(stonith_t *st, int options, const char *node, int level)
 Unregister a fencing level for specified node with local fencer. More...
 
int(* register_level )(stonith_t *st, int options, const char *node, int level, stonith_key_value_t *device_list)
 Register a fencing level for specified node with local fencer. More...
 
int(* metadata )(stonith_t *st, int options, const char *device, const char *provider, char **output, int timeout)
 Get the metadata documentation for a resource. More...
 
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. More...
 
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. More...
 
int(* monitor )(stonith_t *st, int options, const char *id, int timeout)
 Check to see if a local stonith device is reachable. More...
 
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. More...
 
int(* query )(stonith_t *st, int options, const char *node, stonith_key_value_t **devices, int timeout)
 Retrieve a list of registered stonith devices. More...
 
int(* fence )(stonith_t *st, int options, const char *node, const char *action, int timeout, int tolerance)
 Issue a fencing action against a node. More...
 
int(* confirm )(stonith_t *st, int options, const char *node)
 Manually confirm that a node is down. More...
 
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. More...
 
int(* register_notification )(stonith_t *st, const char *event, void(*notify)(stonith_t *st, stonith_event_t *e))
 
int(* remove_notification )(stonith_t *st, const char *event)
 Remove a previously registered notification for event, or all notifications if NULL. More...
 
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. More...
 
int(* remove_callback )(stonith_t *st, int call_id, bool all_callbacks)
 Remove a registered callback for a given call id. More...
 
int(* remove_level_full )(stonith_t *st, int options, const char *node, const char *pattern, const char *attr, const char *value, int level)
 Unregister fencing level for specified node, pattern or attribute. More...
 
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 specified node, pattern or attribute. More...
 
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. More...
 
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. More...
 

Detailed Description

Definition at line 150 of file stonith-ng.h.

Field Documentation

◆ confirm

int(* stonith_api_operations_s::confirm) (stonith_t *st, int options, const char *node)

Manually confirm that a node is down.

Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code

Definition at line 289 of file stonith-ng.h.

◆ connect

int(* stonith_api_operations_s::connect) (stonith_t *st, const char *name, int *stonith_fd)

Connect to the local stonith daemon.

Returns
Legacy Pacemaker return code

Definition at line 162 of file stonith-ng.h.

◆ disconnect

int(* stonith_api_operations_s::disconnect) (stonith_t *st)

Disconnect from the local stonith daemon.

Returns
Legacy Pacemaker return code

Definition at line 169 of file stonith-ng.h.

◆ fence

int(* stonith_api_operations_s::fence) (stonith_t *st, int options, const char *node, const char *action, int timeout, int tolerance)

Issue a fencing action against a node.

Note
Possible actions are, 'on', 'off', and 'reboot'.
Parameters
st,stonithconnection
options,calloptions
node,Thetarget node to fence
action,Thefencing action to take
timeout,Thedefault per device timeout to use with each device capable of fencing the target.
Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code

Definition at line 280 of file stonith-ng.h.

◆ fence_with_delay

int(* stonith_api_operations_s::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.

Note
Possible actions are, 'on', 'off', and 'reboot'.
Parameters
st,stonithconnection
options,calloptions
node,Thetarget node to fence
action,Thefencing action to take
timeout,Thedefault per device timeout to use with each device capable of fencing the target.
delay,Applya fencing delay. Value -1 means disable also any static/random fencing delays from pcmk_delay_base/max
Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code

Definition at line 424 of file stonith-ng.h.

◆ free

int(* stonith_api_operations_s::free) (stonith_t *st)

Destroy the stonith api structure.

Definition at line 155 of file stonith-ng.h.

◆ history

int(* stonith_api_operations_s::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.

Returns
Legacy Pacemaker return code

Definition at line 296 of file stonith-ng.h.

◆ list

int(* stonith_api_operations_s::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.

Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code

Definition at line 236 of file stonith-ng.h.

◆ list_agents

int(* stonith_api_operations_s::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.

Note
if provider is not provided, all known agents will be returned
list must be freed using stonith_key_value_freeall()
call_options parameter is not used, it is reserved for future use.
Returns
Number of items in list on success, or negative errno otherwise

Definition at line 227 of file stonith-ng.h.

◆ metadata

int(* stonith_api_operations_s::metadata) (stonith_t *st, int options, const char *device, const char *provider, char **output, int timeout)

Get the metadata documentation for a resource.

Note
Value is returned in output. Output must be freed when set.
Returns
Legacy Pacemaker return code

Definition at line 215 of file stonith-ng.h.

◆ monitor

int(* stonith_api_operations_s::monitor) (stonith_t *st, int options, const char *id, int timeout)

Check to see if a local stonith device is reachable.

Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code

Definition at line 244 of file stonith-ng.h.

◆ query

int(* stonith_api_operations_s::query) (stonith_t *st, int options, const char *node, stonith_key_value_t **devices, int timeout)

Retrieve a list of registered stonith devices.

Note
If node is provided, only devices that can fence the node id will be returned.
Returns
Number of items in list on success, or negative errno otherwise

Definition at line 262 of file stonith-ng.h.

◆ register_callback

int(* stonith_api_operations_s::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.

Parameters
[in]call_idThe call ID to register callback for
[in]timeoutDefault time to wait until callback expires
[in]optionsBitmask of stonith_call_options (respects st_opt_timeout_updates and st_opt_report_only_success)
[in]userdataPointer that will be given to callback
[in]callback_nameUnique name to identify callback
[in]callbackThe callback function to register
Returns
TRUE on success, FALSE if call_id is negative, -errno otherwise

Definition at line 327 of file stonith-ng.h.

◆ register_device

int(* stonith_api_operations_s::register_device) (stonith_t *st, int options, const char *id, const char *provider, const char *agent, stonith_key_value_t *params)

Register a fence device with the local fencer.

Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code

Definition at line 186 of file stonith-ng.h.

◆ register_level

int(* stonith_api_operations_s::register_level) (stonith_t *st, int options, const char *node, int level, stonith_key_value_t *device_list)

Register a fencing level for specified node with local fencer.

Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code

Definition at line 205 of file stonith-ng.h.

◆ register_level_full

int(* stonith_api_operations_s::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 specified node, pattern or attribute.

Parameters
[in]stFencer connection to use
[in]optionsBitmask of stonith_call_options to pass to fencer
[in]nodeIf not NULL, target level by this node name
[in]patternIf not NULL, target by node name using this regex
[in]attrIf not NULL, target by this node attribute
[in]valueIf not NULL, target by this node attribute value
[in]levelIndex number of level to add
[in]device_listDevices to use in level
Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code
Note
The caller should set only one of node, pattern or attr/value.

Definition at line 379 of file stonith-ng.h.

◆ register_notification

int(* stonith_api_operations_s::register_notification) (stonith_t *st, const char *event, void(*notify)(stonith_t *st, stonith_event_t *e))

Definition at line 298 of file stonith-ng.h.

◆ remove_callback

int(* stonith_api_operations_s::remove_callback) (stonith_t *st, int call_id, bool all_callbacks)

Remove a registered callback for a given call id.

Returns
pcmk_ok

Definition at line 340 of file stonith-ng.h.

◆ remove_device

int(* stonith_api_operations_s::remove_device) (stonith_t *st, int options, const char *name)

Unregister a fence device with the local fencer.

Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code

Definition at line 177 of file stonith-ng.h.

◆ remove_level

int(* stonith_api_operations_s::remove_level) (stonith_t *st, int options, const char *node, int level)

Unregister a fencing level for specified node with local fencer.

Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code

Definition at line 196 of file stonith-ng.h.

◆ remove_level_full

int(* stonith_api_operations_s::remove_level_full) (stonith_t *st, int options, const char *node, const char *pattern, const char *attr, const char *value, int level)

Unregister fencing level for specified node, pattern or attribute.

Parameters
[in]stFencer connection to use
[in]optionsBitmask of stonith_call_options to pass to the fencer
[in]nodeIf not NULL, target level by this node name
[in]patternIf not NULL, target by node name using this regex
[in]attrIf not NULL, target by this node attribute
[in]valueIf not NULL, target by this node attribute value
[in]levelIndex number of level to remove
Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code
Note
The caller should set only one of node, pattern or attr/value.

Definition at line 358 of file stonith-ng.h.

◆ remove_notification

int(* stonith_api_operations_s::remove_notification) (stonith_t *st, const char *event)

Remove a previously registered notification for event, or all notifications if NULL.

Parameters
[in]stFencer connection to use
[in]eventThe event to remove notifications for (may be NULL).
Returns
Legacy Pacemaker return code

Definition at line 311 of file stonith-ng.h.

◆ status

int(* stonith_api_operations_s::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.

Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code

Definition at line 252 of file stonith-ng.h.

◆ validate

int(* stonith_api_operations_s::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.

Parameters
[in]stStonithd connection to use
[in]call_optionsBitmask of stonith_call_options to use with fencer
[in]rsc_idID used to replace CIB secrets in params
[in]namespace_sNamespace of fence agent to validate (optional)
[in]agentFence agent to validate
[in]paramsConfiguration parameters to pass to fence agent
[in]timeoutFail if no response within this many seconds
[out]outputIf non-NULL, where to store any agent output
[out]error_outputIf non-NULL, where to store agent error output
Returns
pcmk_ok if validation succeeds, -errno otherwise
Note
If pcmk_ok is returned, the caller is responsible for freeing the output (if requested).

Definition at line 402 of file stonith-ng.h.


The documentation for this struct was generated from the following file: