18 #ifndef STONITH_NG_INTERNAL__H
19 # define STONITH_NG_INTERNAL__H
24 struct stonith_action_s;
32 GHashTable * device_args, GHashTable * port_map);
37 void (*done) (GPid
pid,
int rc,
const char *output,
46 const char *attr,
const char *value,
53 # define ST_LEVEL_MAX 10
55 # define F_STONITH_CLIENTID "st_clientid"
56 # define F_STONITH_CALLOPTS "st_callopt"
57 # define F_STONITH_CALLID "st_callid"
58 # define F_STONITH_CALLDATA "st_calldata"
59 # define F_STONITH_OPERATION "st_op"
60 # define F_STONITH_TARGET "st_target"
61 # define F_STONITH_REMOTE_OP_ID "st_remote_op"
62 # define F_STONITH_RC "st_rc"
64 # define F_STONITH_TIMEOUT "st_timeout"
65 # define F_STONITH_TOLERANCE "st_tolerance"
67 # define F_STONITH_ACTION_TIMEOUT "st_action_timeout"
69 # define F_STONITH_ACTION_DISALLOWED "st_action_disallowed"
71 # define F_STONITH_DELAY_MAX "st_delay_max"
73 # define F_STONITH_DELAY_BASE "st_delay_base"
76 # define F_STONITH_DEVICE_VERIFIED "st_monitor_verified"
78 # define F_STONITH_DEVICE_REQUIRED "st_required"
80 # define F_STONITH_AVAILABLE_DEVICES "st-available-devices"
81 # define F_STONITH_CALLBACK_TOKEN "st_async_id"
82 # define F_STONITH_CLIENTNAME "st_clientname"
83 # define F_STONITH_CLIENTNODE "st_clientnode"
84 # define F_STONITH_NOTIFY_TYPE "st_notify_type"
85 # define F_STONITH_NOTIFY_ACTIVATE "st_notify_activate"
86 # define F_STONITH_NOTIFY_DEACTIVATE "st_notify_deactivate"
87 # define F_STONITH_DELEGATE "st_delegate"
92 # define F_STONITH_ORIGIN "st_origin"
93 # define F_STONITH_HISTORY_LIST "st_history"
94 # define F_STONITH_DATE "st_date"
95 # define F_STONITH_STATE "st_state"
96 # define F_STONITH_ACTIVE "st_active"
98 # define F_STONITH_DEVICE "st_device_id"
99 # define F_STONITH_ACTION "st_device_action"
100 # define F_STONITH_MODE "st_mode"
102 # define T_STONITH_NG "stonith-ng"
103 # define T_STONITH_REPLY "st-reply"
107 # define T_STONITH_TIMEOUT_VALUE "st-async-timeout-value"
108 # define T_STONITH_NOTIFY "st_notify"
110 # define STONITH_ATTR_ARGMAP "pcmk_arg_map"
111 # define STONITH_ATTR_HOSTARG "pcmk_host_argument"
112 # define STONITH_ATTR_HOSTMAP "pcmk_host_map"
113 # define STONITH_ATTR_HOSTLIST "pcmk_host_list"
114 # define STONITH_ATTR_HOSTCHECK "pcmk_host_check"
115 # define STONITH_ATTR_DELAY_MAX "pcmk_delay_max"
116 # define STONITH_ATTR_DELAY_BASE "pcmk_delay_base"
117 # define STONITH_ATTR_ACTION_LIMIT "pcmk_action_limit"
119 # define STONITH_ATTR_ACTION_OP "action"
121 # define STONITH_OP_EXEC "st_execute"
122 # define STONITH_OP_TIMEOUT_UPDATE "st_timeout_update"
123 # define STONITH_OP_QUERY "st_query"
124 # define STONITH_OP_FENCE "st_fence"
125 # define STONITH_OP_RELAY "st_relay"
126 # define STONITH_OP_CONFIRM "st_confirm"
127 # define STONITH_OP_DEVICE_ADD "st_device_register"
128 # define STONITH_OP_DEVICE_DEL "st_device_remove"
129 # define STONITH_OP_DEVICE_METADATA "st_device_metadata"
130 # define STONITH_OP_FENCE_HISTORY "st_fence_history"
131 # define STONITH_OP_LEVEL_ADD "st_level_add"
132 # define STONITH_OP_LEVEL_DEL "st_level_remove"
134 # define stonith_channel "st_command"
135 # define stonith_channel_callback "st_callback"
137 # define STONITH_WATCHDOG_AGENT "#watchdog"
struct stonith_action_s stonith_action_t
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)
gboolean is_redhat_agent(const char *agent)
Wrappers for and extensions to libxml2.
xmlNode * create_device_registration_xml(const char *id, const char *namespace, const char *agent, stonith_key_value_t *params, const char *rsc_provides)
GPid stonith_action_execute_async(stonith_action_t *action, void *userdata, void(*done)(GPid pid, int rc, const char *output, gpointer user_data))
Wrappers for and extensions to libqb IPC.
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)
int stonith_action_execute(stonith_action_t *action, int *agent_result, char **output)