pacemaker  2.0.4-2deceaa
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Typedefs | Enumerations | Functions
internal.h File Reference
#include <glib.h>
#include <crm/common/ipc.h>
#include <crm/common/output.h>
#include <crm/common/xml.h>
Include dependency graph for internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define ST_LEVEL_MAX   10
#define F_STONITH_CLIENTID   "st_clientid"
#define F_STONITH_CALLOPTS   "st_callopt"
#define F_STONITH_CALLID   "st_callid"
#define F_STONITH_CALLDATA   "st_calldata"
#define F_STONITH_OPERATION   "st_op"
#define F_STONITH_TARGET   "st_target"
#define F_STONITH_REMOTE_OP_ID   "st_remote_op"
#define F_STONITH_REMOTE_OP_ID_RELAY   "st_remote_op_relay"
#define F_STONITH_RC   "st_rc"
#define F_STONITH_TIMEOUT   "st_timeout"
#define F_STONITH_TOLERANCE   "st_tolerance"
#define F_STONITH_DELAY   "st_delay"
#define F_STONITH_ACTION_TIMEOUT   "st_action_timeout"
#define F_STONITH_ACTION_DISALLOWED   "st_action_disallowed"
#define F_STONITH_DELAY_MAX   "st_delay_max"
#define F_STONITH_DELAY_BASE   "st_delay_base"
#define F_STONITH_DEVICE_VERIFIED   "st_monitor_verified"
#define F_STONITH_DEVICE_REQUIRED   "st_required"
#define F_STONITH_AVAILABLE_DEVICES   "st-available-devices"
#define F_STONITH_CALLBACK_TOKEN   "st_async_id"
#define F_STONITH_CLIENTNAME   "st_clientname"
#define F_STONITH_CLIENTNODE   "st_clientnode"
#define F_STONITH_NOTIFY_ACTIVATE   "st_notify_activate"
#define F_STONITH_NOTIFY_DEACTIVATE   "st_notify_deactivate"
#define F_STONITH_DELEGATE   "st_delegate"
#define F_STONITH_ORIGIN   "st_origin"
#define F_STONITH_HISTORY_LIST   "st_history"
#define F_STONITH_DATE   "st_date"
#define F_STONITH_STATE   "st_state"
#define F_STONITH_ACTIVE   "st_active"
#define F_STONITH_DIFFERENTIAL   "st_differential"
#define F_STONITH_DEVICE   "st_device_id"
#define F_STONITH_ACTION   "st_device_action"
#define F_STONITH_MODE   "st_mode"
#define F_STONITH_MERGED   "st_op_merged"
#define T_STONITH_NG   "stonith-ng"
#define T_STONITH_REPLY   "st-reply"
#define T_STONITH_TIMEOUT_VALUE   "st-async-timeout-value"
#define T_STONITH_NOTIFY   "st_notify"
#define STONITH_ATTR_HOSTARG   "pcmk_host_argument"
#define STONITH_ATTR_HOSTMAP   "pcmk_host_map"
#define STONITH_ATTR_HOSTLIST   "pcmk_host_list"
#define STONITH_ATTR_HOSTCHECK   "pcmk_host_check"
#define STONITH_ATTR_DELAY_MAX   "pcmk_delay_max"
#define STONITH_ATTR_DELAY_BASE   "pcmk_delay_base"
#define STONITH_ATTR_ACTION_LIMIT   "pcmk_action_limit"
#define STONITH_ATTR_ACTION_OP   "action"
#define STONITH_OP_EXEC   "st_execute"
#define STONITH_OP_TIMEOUT_UPDATE   "st_timeout_update"
#define STONITH_OP_QUERY   "st_query"
#define STONITH_OP_FENCE   "st_fence"
#define STONITH_OP_RELAY   "st_relay"
#define STONITH_OP_DEVICE_ADD   "st_device_register"
#define STONITH_OP_DEVICE_DEL   "st_device_remove"
#define STONITH_OP_FENCE_HISTORY   "st_fence_history"
#define STONITH_OP_LEVEL_ADD   "st_level_add"
#define STONITH_OP_LEVEL_DEL   "st_level_remove"
#define STONITH_WATCHDOG_AGENT   "#watchdog"


typedef struct stonith_action_s stonith_action_t


enum  st_device_flags {
  st_device_supports_list = 0x0001, st_device_supports_status = 0x0002, st_device_supports_reboot = 0x0004, st_device_supports_parameter_plug = 0x0008,
  st_device_supports_parameter_port = 0x0010


stonith_action_tstonith_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)
void stonith__destroy_action (stonith_action_t *action)
void stonith__action_result (stonith_action_t *action, int *rc, char **output, char **error_output)
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))
int stonith__execute (stonith_action_t *action)
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)
xmlNode * create_device_registration_xml (const char *id, enum stonith_namespace namespace, const char *agent, stonith_key_value_t *params, const char *rsc_provides)
void stonith__register_messages (pcmk__output_t *out)
GList * stonith__parse_targets (const char *hosts)
gboolean stonith__later_succeeded (stonith_history_t *event, stonith_history_t *top_history)
stonith_history_tstonith__sort_history (stonith_history_t *history)
long long stonith__device_parameter_flags (xmlNode *metadata)
int stonith__list_rhcs_agents (stonith_key_value_t **devices)
int stonith__rhcs_metadata (const char *agent, int timeout, char **output)
 Execute RHCS-compatible agent's meta-data action. More...
bool stonith__agent_is_rhcs (const char *agent)
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)
int stonith__failed_history (pcmk__output_t *out, va_list args)
int stonith__history (pcmk__output_t *out, va_list args)
int stonith__full_history (pcmk__output_t *out, va_list args)
int stonith__full_history_xml (pcmk__output_t *out, va_list args)
int stonith__last_fenced_html (pcmk__output_t *out, va_list args)
int stonith__last_fenced_text (pcmk__output_t *out, va_list args)
int stonith__last_fenced_xml (pcmk__output_t *out, va_list args)
int stonith__pending_actions (pcmk__output_t *out, va_list args)
int stonith__event_html (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)
int stonith__validate_agent_html (pcmk__output_t *out, va_list args)
int stonith__validate_agent_text (pcmk__output_t *out, va_list args)
int stonith__validate_agent_xml (pcmk__output_t *out, va_list args)

Macro Definition Documentation

#define F_STONITH_ACTION   "st_device_action"

Definition at line 119 of file internal.h.

#define F_STONITH_ACTION_DISALLOWED   "st_action_disallowed"

Host in query result is not allowed to run this action

Definition at line 89 of file internal.h.

#define F_STONITH_ACTION_TIMEOUT   "st_action_timeout"

Action specific timeout period returned in query of fencing devices.

Definition at line 87 of file internal.h.

#define F_STONITH_ACTIVE   "st_active"

Definition at line 115 of file internal.h.

#define F_STONITH_AVAILABLE_DEVICES   "st-available-devices"

number of available devices in query result

Definition at line 100 of file internal.h.

#define F_STONITH_CALLBACK_TOKEN   "st_async_id"

Definition at line 101 of file internal.h.

#define F_STONITH_CALLDATA   "st_calldata"

Definition at line 76 of file internal.h.

#define F_STONITH_CALLID   "st_callid"

Definition at line 75 of file internal.h.

#define F_STONITH_CALLOPTS   "st_callopt"

Definition at line 74 of file internal.h.

#define F_STONITH_CLIENTID   "st_clientid"

Definition at line 73 of file internal.h.

#define F_STONITH_CLIENTNAME   "st_clientname"

Definition at line 102 of file internal.h.

#define F_STONITH_CLIENTNODE   "st_clientnode"

Definition at line 103 of file internal.h.

#define F_STONITH_DATE   "st_date"

Definition at line 113 of file internal.h.

#define F_STONITH_DELAY   "st_delay"

Definition at line 85 of file internal.h.

#define F_STONITH_DELAY_BASE   "st_delay_base"

Base delay used for a fencing delay

Definition at line 93 of file internal.h.

#define F_STONITH_DELAY_MAX   "st_delay_max"

Maximum of random fencing delay for a device

Definition at line 91 of file internal.h.

#define F_STONITH_DELEGATE   "st_delegate"

Definition at line 106 of file internal.h.

#define F_STONITH_DEVICE   "st_device_id"

Definition at line 118 of file internal.h.

#define F_STONITH_DEVICE_REQUIRED   "st_required"

device is required for this action

Definition at line 98 of file internal.h.

#define F_STONITH_DEVICE_VERIFIED   "st_monitor_verified"

Has this device been verified using a monitor type operation (monitor, list, status)

Definition at line 96 of file internal.h.

#define F_STONITH_DIFFERENTIAL   "st_differential"

Definition at line 116 of file internal.h.

#define F_STONITH_HISTORY_LIST   "st_history"

Definition at line 112 of file internal.h.

#define F_STONITH_MERGED   "st_op_merged"

Definition at line 121 of file internal.h.

#define F_STONITH_MODE   "st_mode"

Definition at line 120 of file internal.h.

#define F_STONITH_NOTIFY_ACTIVATE   "st_notify_activate"

Definition at line 104 of file internal.h.

#define F_STONITH_NOTIFY_DEACTIVATE   "st_notify_deactivate"

Definition at line 105 of file internal.h.

#define F_STONITH_OPERATION   "st_op"

Definition at line 77 of file internal.h.

#define F_STONITH_ORIGIN   "st_origin"

The node initiating the stonith operation. If an operation is relayed, this is the last node the operation lands on. When in standalone mode, origin is the client's id that originated the operation.

Definition at line 111 of file internal.h.

#define F_STONITH_RC   "st_rc"

Definition at line 81 of file internal.h.

#define F_STONITH_REMOTE_OP_ID   "st_remote_op"

Definition at line 79 of file internal.h.

#define F_STONITH_REMOTE_OP_ID_RELAY   "st_remote_op_relay"

Definition at line 80 of file internal.h.

#define F_STONITH_STATE   "st_state"

Definition at line 114 of file internal.h.

#define F_STONITH_TARGET   "st_target"

Definition at line 78 of file internal.h.

#define F_STONITH_TIMEOUT   "st_timeout"

Timeout period per a device execution

Definition at line 83 of file internal.h.

#define F_STONITH_TOLERANCE   "st_tolerance"

Definition at line 84 of file internal.h.

#define ST_LEVEL_MAX   10

Definition at line 71 of file internal.h.

#define STONITH_ATTR_ACTION_LIMIT   "pcmk_action_limit"

Definition at line 137 of file internal.h.

#define STONITH_ATTR_ACTION_OP   "action"

Definition at line 139 of file internal.h.

#define STONITH_ATTR_DELAY_BASE   "pcmk_delay_base"

Definition at line 136 of file internal.h.

#define STONITH_ATTR_DELAY_MAX   "pcmk_delay_max"

Definition at line 135 of file internal.h.

#define STONITH_ATTR_HOSTARG   "pcmk_host_argument"

Definition at line 131 of file internal.h.

#define STONITH_ATTR_HOSTCHECK   "pcmk_host_check"

Definition at line 134 of file internal.h.

#define STONITH_ATTR_HOSTLIST   "pcmk_host_list"

Definition at line 133 of file internal.h.

#define STONITH_ATTR_HOSTMAP   "pcmk_host_map"

Definition at line 132 of file internal.h.

#define STONITH_OP_DEVICE_ADD   "st_device_register"

Definition at line 146 of file internal.h.

#define STONITH_OP_DEVICE_DEL   "st_device_remove"

Definition at line 147 of file internal.h.

#define STONITH_OP_EXEC   "st_execute"

Definition at line 141 of file internal.h.

#define STONITH_OP_FENCE   "st_fence"

Definition at line 144 of file internal.h.

#define STONITH_OP_FENCE_HISTORY   "st_fence_history"

Definition at line 148 of file internal.h.

#define STONITH_OP_LEVEL_ADD   "st_level_add"

Definition at line 149 of file internal.h.

#define STONITH_OP_LEVEL_DEL   "st_level_remove"

Definition at line 150 of file internal.h.

#define STONITH_OP_QUERY   "st_query"

Definition at line 143 of file internal.h.

#define STONITH_OP_RELAY   "st_relay"

Definition at line 145 of file internal.h.

#define STONITH_OP_TIMEOUT_UPDATE   "st_timeout_update"

Definition at line 142 of file internal.h.

#define STONITH_WATCHDOG_AGENT   "#watchdog"

Definition at line 152 of file internal.h.

#define T_STONITH_NG   "stonith-ng"

Definition at line 123 of file internal.h.

#define T_STONITH_NOTIFY   "st_notify"

Definition at line 129 of file internal.h.

#define T_STONITH_REPLY   "st-reply"

Definition at line 124 of file internal.h.

#define T_STONITH_TIMEOUT_VALUE   "st-async-timeout-value"

For async operations, an event from the server containing the total amount of time the server is allowing for the operation to take place is returned to the client.

Definition at line 128 of file internal.h.

Typedef Documentation

typedef struct stonith_action_s stonith_action_t

Definition at line 28 of file internal.h.

Enumeration Type Documentation


Definition at line 18 of file internal.h.

Function Documentation

xmlNode* create_device_registration_xml ( const char *  id,
enum stonith_namespace  namespace,
const char *  agent,
stonith_key_value_t params,
const char *  rsc_provides 

Definition at line 273 of file st_client.c.

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 

Definition at line 393 of file st_client.c.

void stonith__action_result ( stonith_action_t action,
int *  rc,
char **  output,
char **  error_output 

Definition at line 626 of file st_client.c.

bool stonith__agent_is_rhcs ( const char *  agent)

Definition at line 231 of file st_rhcs.c.

void stonith__destroy_action ( stonith_action_t action)

Definition at line 595 of file st_client.c.

long long stonith__device_parameter_flags ( xmlNode *  metadata)

Definition at line 2635 of file st_client.c.

int stonith__event_html ( pcmk__output_t out,
va_list  args 

Definition at line 284 of file st_output.c.

int stonith__event_text ( pcmk__output_t out,
va_list  args 

Definition at line 332 of file st_output.c.

int stonith__event_xml ( pcmk__output_t out,
va_list  args 

Definition at line 370 of file st_output.c.

int stonith__execute ( stonith_action_t action)

Definition at line 905 of file st_client.c.

int stonith__failed_history ( pcmk__output_t out,
va_list  args 

Definition at line 34 of file st_output.c.

int stonith__full_history ( pcmk__output_t out,
va_list  args 

Definition at line 114 of file st_output.c.

int stonith__full_history_xml ( pcmk__output_t out,
va_list  args 

Definition at line 151 of file st_output.c.

int stonith__history ( pcmk__output_t out,
va_list  args 

Definition at line 73 of file st_output.c.

int stonith__last_fenced_html ( pcmk__output_t out,
va_list  args 

Definition at line 193 of file st_output.c.

int stonith__last_fenced_text ( pcmk__output_t out,
va_list  args 

Definition at line 209 of file st_output.c.

int stonith__last_fenced_xml ( pcmk__output_t out,
va_list  args 

Definition at line 224 of file st_output.c.

gboolean stonith__later_succeeded ( stonith_history_t event,
stonith_history_t top_history 

Definition at line 2547 of file st_client.c.

int stonith__list_rhcs_agents ( stonith_key_value_t **  devices)

Definition at line 31 of file st_rhcs.c.

GList* stonith__parse_targets ( const char *  hosts)

Definition at line 2507 of file st_client.c.

int stonith__pending_actions ( pcmk__output_t out,
va_list  args 

Definition at line 244 of file st_output.c.

void stonith__register_messages ( pcmk__output_t out)

Definition at line 525 of file st_output.c.

int stonith__rhcs_metadata ( const char *  agent,
int  timeout,
char **  output 

Execute RHCS-compatible agent's meta-data action.

[in]agentAgent to execute
[in]timeoutAction timeout
[out]outputWhere to store action output (or NULL to ignore)
timeout is currently ignored; shouldn't we use it?

Definition at line 205 of file st_rhcs.c.

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 

Definition at line 242 of file st_rhcs.c.

stonith_history_t* stonith__sort_history ( stonith_history_t history)

Definition at line 2578 of file st_client.c.

int stonith__validate_agent_html ( pcmk__output_t out,
va_list  args 

Definition at line 416 of file st_output.c.

int stonith__validate_agent_text ( pcmk__output_t out,
va_list  args 

Definition at line 441 of file st_output.c.

int stonith__validate_agent_xml ( pcmk__output_t out,
va_list  args 

Definition at line 469 of file st_output.c.

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 

Definition at line 655 of file st_client.c.

int stonith_action_execute_async ( stonith_action_t action,
void *  userdata,
void(*)(GPid pid, int rc, const char *output, gpointer user_data)  done,
void(*)(GPid pid, gpointer user_data)  fork_cb 

Definition at line 878 of file st_client.c.