pacemaker  2.1.7-0f7f88312f
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 a fencer connection. More...
 
int(* connect )(stonith_t *st, const char *name, int *stonith_fd)
 Connect to the local fencer. 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 *namespace, const char *agent, const 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, const stonith_key_value_t *device_list)
 Register a fencing level for specified node with local fencer. More...
 
int(* metadata )(stonith_t *stonith, int call_options, const char *agent, const char *namespace, char **output, int timeout_sec)
 Retrieve a fence agent's metadata. More...
 
int(* list_agents )(stonith_t *stonith, int call_options, const char *namespace, stonith_key_value_t **devices, int timeout)
 Retrieve a list of installed fence agents. More...
 
int(* list )(stonith_t *stonith, int call_options, const char *id, char **list_info, int timeout)
 Get the output of a fence device's list action. More...
 
int(* monitor )(stonith_t *stonith, int call_options, const char *id, int timeout)
 Check whether a fence device is reachable by monitor action. More...
 
int(* status )(stonith_t *stonith, int call_options, const char *id, const char *port, int timeout)
 Check whether a fence device target is reachable by status action. More...
 
int(* query )(stonith_t *stonith, int call_options, const char *target, stonith_key_value_t **devices, int timeout)
 List registered fence devices. More...
 
int(* fence )(stonith_t *stonith, int call_options, const char *node, const char *action, int timeout, int tolerance)
 Request that a target get fenced. More...
 
int(* confirm )(stonith_t *stonith, int call_options, const char *target)
 Manually confirm that a node has been fenced. More...
 
int(* history )(stonith_t *stonith, int call_options, const char *node, stonith_history_t **history, int timeout)
 List fencing actions that have occurred for a target. More...
 
int(* register_notification )(stonith_t *stonith, const char *event, void(*callback)(stonith_t *st, stonith_event_t *e))
 Register a callback for fence notifications. More...
 
int(* remove_notification )(stonith_t *stonith, const char *event)
 Unregister callbacks for fence notifications. More...
 
int(* register_callback )(stonith_t *stonith, int call_id, int timeout, int options, void *user_data, const char *callback_name, void(*callback)(stonith_t *st, stonith_callback_data_t *data))
 Register a callback for an asynchronous fencing result. More...
 
int(* remove_callback )(stonith_t *stonith, int call_id, bool all_callbacks)
 Unregister callbacks for asynchronous fencing results. 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, const 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, const 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 *stonith, int call_options, const char *node, const char *action, int timeout, int tolerance, int delay)
 Request delayed fencing of a target. More...
 

Detailed Description

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

Field Documentation

◆ confirm

int(* stonith_api_operations_s::confirm) (stonith_t *stonith, int call_options, const char *target)

Manually confirm that a node has been fenced.

Parameters
[in,out]stonithFencer connection to use
[in]call_optionsGroup of enum stonith_call_options
[in]targetFence target
Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code

Definition at line 372 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 fencer.

Parameters
[in,out]stFencer connection to connect
[in]nameClient name to use
[out]stonith_fdIf NULL, use a main loop, otherwise store IPC file descriptor here
Returns
Legacy Pacemaker return code

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

◆ disconnect

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

Disconnect from the local stonith daemon.

Parameters
[in,out]stFencer connection to disconnect
Returns
Legacy Pacemaker return code

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

◆ fence

int(* stonith_api_operations_s::fence) (stonith_t *stonith, int call_options, const char *node, const char *action, int timeout, int tolerance)

Request that a target get fenced.

Parameters
[in,out]stonithFencer connection to use
[in]call_optionsGroup of enum stonith_call_options
[in]nodeFence target
[in]action"on", "off", or "reboot"
[in]timeoutDefault per-device timeout to use with each executed device
[in]toleranceAccept result of identical fence action completed within this time
Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code

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

◆ fence_with_delay

int(* stonith_api_operations_s::fence_with_delay) (stonith_t *stonith, int call_options, const char *node, const char *action, int timeout, int tolerance, int delay)

Request delayed fencing of a target.

Parameters
[in,out]stonithFencer connection to use
[in]call_optionsGroup of enum stonith_call_options
[in]nodeFence target
[in]action"on", "off", or "reboot"
[in]timeoutDefault per-device timeout to use with each executed device
[in]toleranceAccept result of identical fence action completed within this time
[in]delayExecute fencing after this delay (-1 disables any delay from pcmk_delay_base and pcmk_delay_max)
Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code

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

◆ free

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

Destroy a fencer connection.

Parameters
[in,out]stFencer connection to destroy

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

◆ history

int(* stonith_api_operations_s::history) (stonith_t *stonith, int call_options, const char *node, stonith_history_t **history, int timeout)

List fencing actions that have occurred for a target.

Parameters
[in,out]stonithFencer connection to use
[in]call_optionsGroup of enum stonith_call_options
[in]nodeFence target
[out]historyWhere to store list of fencing actions
[in]timeoutError if unable to complete within this
Returns
Legacy Pacemaker return code

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

◆ list

int(* stonith_api_operations_s::list) (stonith_t *stonith, int call_options, const char *id, char **list_info, int timeout)

Get the output of a fence device's list action.

Parameters
[in,out]stonithFencer connection to use
[in]call_optionsGroup of enum stonith_call_options
[in]idFence device ID to run list for
[out]list_infoWhere to store list output
[in]timeoutError if unable to complete within this
Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code

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

◆ list_agents

int(* stonith_api_operations_s::list_agents) (stonith_t *stonith, int call_options, const char *namespace, stonith_key_value_t **devices, int timeout)

Retrieve a list of installed fence agents.

Parameters
[in,out]stonithFencer connection to use
[in]call_optionsGroup of enum stonith_call_options (currently ignored)
[in]namespaceType of fence agents to list ("redhat" or "stonith-ng" for RHCS-style, "internal" for Pacemaker-internal devices, "heartbeat" for LHA-style, or "any" or NULL for all)
[out]devicesWhere to store agent list
[in]timeoutError if unable to complete within this (currently ignored)
Returns
Number of items in list on success, or negative errno otherwise
Note
The caller is responsible for freeing the returned list with stonith_key_value_freeall().

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

◆ metadata

int(* stonith_api_operations_s::metadata) (stonith_t *stonith, int call_options, const char *agent, const char *namespace, char **output, int timeout_sec)

Retrieve a fence agent's metadata.

Parameters
[in,out]stonithFencer connection
[in]call_optionsGroup of enum stonith_call_options (currently ignored)
[in]agentFence agent to query
[in]namespaceType of fence agent to search for ("redhat" or "stonith-ng" for RHCS-style, "internal" for Pacemaker-internal devices, "heartbeat" for LHA-style, or "any" or NULL for any)
[out]outputWhere to store metadata
[in]timeout_secError if not complete within this time
Returns
Legacy Pacemaker return code
Note
The caller is responsible for freeing *output using free().

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

◆ monitor

int(* stonith_api_operations_s::monitor) (stonith_t *stonith, int call_options, const char *id, int timeout)

Check whether a fence device is reachable by monitor action.

Parameters
[in,out]stonithFencer connection to use
[in]call_optionsGroup of enum stonith_call_options
[in]idFence device ID to run monitor for
[in]timeoutError if unable to complete within this
Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code

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

◆ query

int(* stonith_api_operations_s::query) (stonith_t *stonith, int call_options, const char *target, stonith_key_value_t **devices, int timeout)

List registered fence devices.

Parameters
[in,out]stonithFencer connection to use
[in]call_optionsGroup of enum stonith_call_options
[in]targetFence target to run status for
[out]devicesWhere to store list of fence devices
[in]timeoutError if unable to complete within this
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 341 of file stonith-ng.h.

◆ register_callback

int(* stonith_api_operations_s::register_callback) (stonith_t *stonith, int call_id, int timeout, int options, void *user_data, const char *callback_name, void(*callback)(stonith_t *st, stonith_callback_data_t *data))

Register a callback for an asynchronous fencing result.

Parameters
[in,out]stonithFencer connection to use
[in]call_idCall ID to register callback for
[in]timeoutError if result not received in this time
[in]optionsGroup of enum stonith_call_options (respects st_opt_timeout_updates and st_opt_report_only_success)
[in,out]user_dataPointer to pass to callback
[in]callback_nameUnique identifier for callback
[in]callbackCallback to register (may be called immediately if call_id indicates error)
Returns
TRUE on success, FALSE if call_id indicates error, or -EINVAL if stonith is not valid

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

◆ register_device

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

Register a fence device with the local fencer.

Parameters
[in,out]stFencer connection to use
[in]optionsGroup of enum stonith_call_options
[in]idID of fence device to register
[in]namespaceType of fence agent to search for ("redhat" or "stonith-ng" for RHCS-style, "internal" for Pacemaker-internal devices, "heartbeat" for LHA-style, or "any" or NULL for any)
[in]agentName of fence agent for device
[in]paramsFence agent parameters for device
Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code

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

◆ register_level

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

Register a fencing level for specified node with local fencer.

Parameters
[in,out]stFencer connection to use
[in]optionsGroup of enum stonith_call_options
[in]nodeTarget node to register level for
[in]levelTopology level number to register
[in]device_listDevices to register in level
Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code

Definition at line 238 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, const stonith_key_value_t *device_list)

Register fencing level for specified node, pattern or attribute.

Parameters
[in,out]stFencer connection to use
[in]optionsGroup of enum stonith_call_options
[in]nodeIf not NULL, register level targeting this node by name
[in]patternIf not NULL, register level targeting nodes whose names match this regular expression
[in]attrIf this and value are not NULL, register level targeting nodes with this node attribute set to value
[in]valueIf this and attr are not NULL, register level targeting nodes with node attribute attr set to this
[in]levelTopology level number to remove
[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 494 of file stonith-ng.h.

◆ register_notification

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

Register a callback for fence notifications.

Parameters
[in,out]stonithFencer connection to use
[in]eventEvent to register for
[in]callbackCallback to register
Returns
Legacy Pacemaker return code

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

◆ remove_callback

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

Unregister callbacks for asynchronous fencing results.

Parameters
[in,out]stonithFencer connection to use
[in]call_idIf all_callbacks is false, call ID to unregister callback for
[in]all_callbacksIf true, unregister all callbacks
Returns
pcmk_ok

Definition at line 444 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.

Parameters
[in,out]stFencer connection to disconnect
[in]optionsGroup of enum stonith_call_options
[in]nameID of fence device to unregister
Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code

Definition at line 190 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.

Parameters
[in,out]stFencer connection to use
[in]optionsGroup of enum stonith_call_options
[in]nodeTarget node to unregister level for
[in]levelTopology level number to unregister
Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code

Definition at line 223 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,out]stFencer connection to use
[in]optionsGroup of enum stonith_call_options
[in]nodeIf not NULL, unregister level targeting this node
[in]patternIf not NULL, unregister level targeting nodes whose names match this regular expression
[in]attrIf this and value are not NULL, unregister level targeting nodes with this node attribute set to value
[in]valueIf this and attr are not NULL, unregister level targeting nodes with node attribute attr set to this
[in]levelTopology level number 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 and value.

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

◆ remove_notification

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

Unregister callbacks for fence notifications.

Parameters
[in,out]stonithFencer connection to use
[in]eventEvent to unregister callbacks for (NULL for all)
Returns
Legacy Pacemaker return code

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

◆ status

int(* stonith_api_operations_s::status) (stonith_t *stonith, int call_options, const char *id, const char *port, int timeout)

Check whether a fence device target is reachable by status action.

Parameters
[in,out]stonithFencer connection to use
[in]call_optionsGroup of enum stonith_call_options
[in]idFence device ID to run status for
[in]portFence target to run status for
[in]timeoutError if unable to complete within this
Returns
pcmk_ok (if synchronous) or positive call ID (if asynchronous) on success, otherwise a negative legacy Pacemaker return code

Definition at line 324 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, const stonith_key_value_t *params, int timeout, char **output, char **error_output)

Validate an arbitrary stonith device configuration.

Parameters
[in,out]stFencer connection to use
[in]call_optionsGroup of enum stonith_call_options
[in]rsc_idID used to replace CIB secrets in params
[in]namespace_sType of fence agent to validate ("redhat" or "stonith-ng" for RHCS-style, "internal" for Pacemaker-internal devices, "heartbeat" for LHA-style, or "any" or NULL for any)
[in]agentFence agent to validate
[in]paramsConfiguration parameters to pass to 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) with free().

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


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