pacemaker
2.1.4-dc6eb4362
Scalable High-Availability cluster resource manager
|
Fencing aka. STONITH. More...
#include <dlfcn.h>
#include <errno.h>
#include <stdbool.h>
#include <stdint.h>
#include <time.h>
Go to the source code of this file.
Data Structures | |
struct | stonith_key_value_s |
struct | stonith_history_s |
struct | stonith_event_s |
struct | stonith_callback_data_s |
struct | stonith_api_operations_s |
struct | stonith_s |
Macros | |
#define | T_STONITH_NOTIFY_DISCONNECT "st_notify_disconnect" |
#define | T_STONITH_NOTIFY_FENCE "st_notify_fence" |
#define | T_STONITH_NOTIFY_HISTORY "st_notify_history" |
#define | T_STONITH_NOTIFY_HISTORY_SYNCED "st_notify_history_synced" |
#define | STONITH_LIBRARY "libstonithd.so.26" |
Typedefs | |
typedef struct stonith_key_value_s | stonith_key_value_t |
typedef struct stonith_history_s | stonith_history_t |
typedef struct stonith_s | stonith_t |
typedef struct stonith_event_s | stonith_event_t |
typedef struct stonith_callback_data_s | stonith_callback_data_t |
typedef struct stonith_api_operations_s | stonith_api_operations_t |
typedef int(* | st_api_kick_fn) (int nodeid, const char *uname, int timeout, bool off) |
typedef time_t(* | st_api_time_fn) (int nodeid, const char *uname, bool in_progress) |
Enumerations | |
enum | stonith_state { stonith_connected_command, stonith_connected_query, stonith_disconnected } |
enum | stonith_call_options { st_opt_none = 0x00000000, st_opt_verbose = 0x00000001, st_opt_allow_suicide = 0x00000002, st_opt_manual_ack = 0x00000008, st_opt_discard_reply = 0x00000010, st_opt_topology = 0x00000040, st_opt_scope_local = 0x00000100, st_opt_cs_nodeid = 0x00000200, st_opt_sync_call = 0x00001000, st_opt_timeout_updates = 0x00002000, st_opt_report_only_success = 0x00004000, st_opt_cleanup = 0x000080000, st_opt_broadcast = 0x000100000 } |
enum | op_state { st_query, st_exec, st_done, st_duplicate, st_failed } |
enum | stonith_namespace { st_namespace_invalid, st_namespace_any, st_namespace_internal, st_namespace_rhcs, st_namespace_lha } |
Functions | |
enum stonith_namespace | stonith_text2namespace (const char *namespace_s) |
Get agent namespace by name. More... | |
const char * | stonith_namespace2text (enum stonith_namespace st_namespace) |
Get agent namespace name. More... | |
enum stonith_namespace | stonith_get_namespace (const char *agent, const char *namespace_s) |
Determine namespace of a fence agent. More... | |
stonith_t * | stonith_api_new (void) |
void | stonith_api_delete (stonith_t *st) |
void | stonith_dump_pending_callbacks (stonith_t *st) |
bool | stonith_dispatch (stonith_t *st) |
stonith_key_value_t * | stonith_key_value_add (stonith_key_value_t *kvp, const char *key, const char *value) |
void | stonith_key_value_freeall (stonith_key_value_t *kvp, int keys, int values) |
void | stonith_history_free (stonith_history_t *history) |
int | stonith_api_connect_retry (stonith_t *st, const char *name, int max_attempts) |
Make a blocking connection attempt to the fencer. More... | |
const char * | stonith_op_state_str (enum op_state state) |
Return string equivalent of an operation state value. More... | |
int | stonith_api_kick (uint32_t nodeid, const char *uname, int timeout, bool off) |
time_t | stonith_api_time (uint32_t nodeid, const char *uname, bool in_progress) |
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. More... | |
const char * | get_stonith_provider (const char *agent, const char *provider) |
Fencing aka. STONITH.
Definition in file stonith-ng.h.
#define STONITH_LIBRARY "libstonithd.so.26" |
Definition at line 508 of file stonith-ng.h.
#define T_STONITH_NOTIFY_DISCONNECT "st_notify_disconnect" |
Definition at line 35 of file stonith-ng.h.
#define T_STONITH_NOTIFY_FENCE "st_notify_fence" |
Definition at line 36 of file stonith-ng.h.
#define T_STONITH_NOTIFY_HISTORY "st_notify_history" |
Definition at line 37 of file stonith-ng.h.
#define T_STONITH_NOTIFY_HISTORY_SYNCED "st_notify_history_synced" |
Definition at line 38 of file stonith-ng.h.
Definition at line 510 of file stonith-ng.h.
typedef time_t(* st_api_time_fn) (int nodeid, const char *uname, bool in_progress) |
Definition at line 511 of file stonith-ng.h.
typedef struct stonith_api_operations_s stonith_api_operations_t |
typedef struct stonith_callback_data_s stonith_callback_data_t |
typedef struct stonith_event_s stonith_event_t |
typedef struct stonith_history_s stonith_history_t |
typedef struct stonith_key_value_s stonith_key_value_t |
Definition at line 117 of file stonith-ng.h.
enum op_state |
Order matters here, do not change values
Enumerator | |
---|---|
st_query | |
st_exec | |
st_done | |
st_duplicate | |
st_failed |
Definition at line 71 of file stonith-ng.h.
enum stonith_call_options |
Definition at line 47 of file stonith-ng.h.
enum stonith_namespace |
Enumerator | |
---|---|
st_namespace_invalid | |
st_namespace_any | |
st_namespace_internal | |
st_namespace_rhcs | |
st_namespace_lha |
Definition at line 81 of file stonith-ng.h.
enum stonith_state |
Enumerator | |
---|---|
stonith_connected_command | |
stonith_connected_query | |
stonith_disconnected |
Definition at line 41 of file stonith-ng.h.
const char * get_stonith_provider | ( | const char * | agent, |
const char * | provider | ||
) |
Definition at line 2523 of file st_client.c.
const char* stonith_action_str | ( | const char * | action | ) |
Turn stonith action into a more readable string.
action | Stonith action |
Definition at line 2042 of file st_client.c.
bool stonith_agent_exists | ( | const char * | agent, |
int | timeout | ||
) |
Does the given agent describe a stonith resource that can exist?
[in] | agent | What is the name of the agent? |
[in] | timeout | Timeout to use when querying. If 0 is given, use a default of 120. |
Definition at line 2011 of file st_client.c.
int stonith_api_connect_retry | ( | stonith_t * | st, |
const char * | name, | ||
int | max_attempts | ||
) |
Make a blocking connection attempt to the fencer.
[in,out] | st | Fencer API object |
[in] | name | Client name to use with fencer |
[in] | max_attempts | Return error if this many attempts fail |
Definition at line 1840 of file st_client.c.
void stonith_api_delete | ( | stonith_t * | st | ) |
Definition at line 1676 of file st_client.c.
int stonith_api_kick | ( | uint32_t | nodeid, |
const char * | uname, | ||
int | timeout, | ||
bool | off | ||
) |
Definition at line 1905 of file st_client.c.
stonith_t* stonith_api_new | ( | void | ) |
Definition at line 1762 of file st_client.c.
time_t stonith_api_time | ( | uint32_t | nodeid, |
const char * | uname, | ||
bool | in_progress | ||
) |
Definition at line 1947 of file st_client.c.
bool stonith_dispatch | ( | stonith_t * | st | ) |
Definition at line 1618 of file st_client.c.
void stonith_dump_pending_callbacks | ( | stonith_t * | st | ) |
Definition at line 1335 of file st_client.c.
enum stonith_namespace stonith_get_namespace | ( | const char * | agent, |
const char * | namespace_s | ||
) |
Determine namespace of a fence agent.
[in] | agent | Fence agent type |
[in] | namespace_s | Name of agent namespace as string, if known |
Definition at line 151 of file st_client.c.
void stonith_history_free | ( | stonith_history_t * | history | ) |
Definition at line 737 of file st_client.c.
stonith_key_value_t* stonith_key_value_add | ( | stonith_key_value_t * | kvp, |
const char * | key, | ||
const char * | value | ||
) |
Definition at line 1861 of file st_client.c.
void stonith_key_value_freeall | ( | stonith_key_value_t * | kvp, |
int | keys, | ||
int | values | ||
) |
Definition at line 1884 of file st_client.c.
const char* stonith_namespace2text | ( | enum stonith_namespace | st_namespace | ) |
Get agent namespace name.
[in] | namespace | Namespace as enum value |
Definition at line 130 of file st_client.c.
const char* stonith_op_state_str | ( | enum op_state | state | ) |
Return string equivalent of an operation state value.
[in] | state | Fencing operation state value |
Definition at line 2275 of file st_client.c.
enum stonith_namespace stonith_text2namespace | ( | const char * | namespace_s | ) |
Get agent namespace by name.
[in] | namespace_s | Name of namespace as string |
Definition at line 104 of file st_client.c.