![]() |
pacemaker
2.0.1-9e909a5bdd
Scalable High-Availability cluster resource manager
|
#include <crm_internal.h>#include <unistd.h>#include <stdlib.h>#include <stdio.h>#include <string.h>#include <ctype.h>#include <sys/stat.h>#include <sys/types.h>#include <sys/wait.h>#include <glib.h>#include <crm/crm.h>#include <crm/stonith-ng.h>#include <crm/fencing/internal.h>#include <crm/msg_xml.h>#include <crm/common/xml.h>#include <crm/common/mainloop.h>
Go to the source code of this file.
Data Structures | |
| struct | timer_rec_s |
Macros | |
| #define | FAILURE_MAX_RETRIES 2 |
| #define | READ_MAX 500 |
| #define | api_log_open() openlog("stonith-api", LOG_CONS | LOG_NDELAY | LOG_PID, LOG_DAEMON) |
| #define | api_log(level, fmt, args...) syslog(level, "%s: "fmt, __FUNCTION__, args) |
Typedefs | |
| typedef struct stonith_private_s | stonith_private_t |
| typedef struct stonith_notify_client_s | stonith_notify_client_t |
| typedef struct stonith_callback_client_s | stonith_callback_client_t |
| typedef int(* | stonith_op_t) (const char *, int, const char *, xmlNode *, xmlNode *, xmlNode *, xmlNode **, xmlNode **) |
Functions | |
| CRM_TRACE_INIT_DATA (stonith) | |
| bool | stonith_dispatch (stonith_t *st) |
| xmlNode * | stonith_create_op (int call_id, const char *token, const char *op, xmlNode *data, int call_options) |
| int | stonith_send_command (stonith_t *stonith, const char *op, xmlNode *data, xmlNode **output_data, int call_options, int timeout) |
| 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... | |
| xmlNode * | create_device_registration_xml (const char *id, enum stonith_namespace namespace, const char *agent, stonith_key_value_t *params, const char *rsc_provides) |
| 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) |
| void | stonith__destroy_action (stonith_action_t *action) |
| void | stonith__action_result (stonith_action_t *action, int *rc, char **output, char **error_output) |
| 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) |
| GPid | stonith_action_execute_async (stonith_action_t *action, void *userdata, void(*done)(GPid pid, int rc, const char *output, gpointer user_data)) |
| int | stonith__execute (stonith_action_t *action) |
| void | stonith_history_free (stonith_history_t *history) |
| const char * | get_stonith_provider (const char *agent, const char *provider) |
| Deprecated (use stonith_get_namespace() instead) More... | |
| void | stonith_dump_pending_callbacks (stonith_t *stonith) |
| void | stonith_api_delete (stonith_t *stonith) |
| stonith_t * | stonith_api_new (void) |
| stonith_key_value_t * | stonith_key_value_add (stonith_key_value_t *head, const char *key, const char *value) |
| void | stonith_key_value_freeall (stonith_key_value_t *head, int keys, int values) |
| 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) |
| #define api_log | ( | level, | |
| fmt, | |||
| args... | |||
| ) | syslog(level, "%s: "fmt, __FUNCTION__, args) |
Definition at line 2349 of file st_client.c.
| #define api_log_open | ( | ) | openlog("stonith-api", LOG_CONS | LOG_NDELAY | LOG_PID, LOG_DAEMON) |
Definition at line 2348 of file st_client.c.
| #define FAILURE_MAX_RETRIES 2 |
Definition at line 668 of file st_client.c.
| #define READ_MAX 500 |
Definition at line 705 of file st_client.c.
| typedef struct stonith_callback_client_s stonith_callback_client_t |
| typedef struct stonith_notify_client_s stonith_notify_client_t |
| typedef int(* stonith_op_t) (const char *, int, const char *, xmlNode *, xmlNode *, xmlNode *, xmlNode **, xmlNode **) |
Definition at line 107 of file st_client.c.
| typedef struct stonith_private_s stonith_private_t |
| 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 240 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 360 of file st_client.c.
| CRM_TRACE_INIT_DATA | ( | stonith | ) |
| const char* get_stonith_provider | ( | const char * | agent, |
| const char * | provider | ||
| ) |
Deprecated (use stonith_get_namespace() instead)
Definition at line 1359 of file st_client.c.
| void stonith__action_result | ( | stonith_action_t * | action, |
| int * | rc, | ||
| char ** | output, | ||
| char ** | error_output | ||
| ) |
Definition at line 641 of file st_client.c.
| void stonith__destroy_action | ( | stonith_action_t * | action | ) |
Definition at line 616 of file st_client.c.
| int stonith__execute | ( | stonith_action_t * | action | ) |
Definition at line 1085 of file st_client.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 | ||
| ) |
Definition at line 670 of file st_client.c.
| GPid stonith_action_execute_async | ( | stonith_action_t * | action, |
| void * | userdata, | ||
| void(*)(GPid pid, int rc, const char *output, gpointer user_data) | done | ||
| ) |
Definition at line 1056 of file st_client.c.
| void stonith_api_delete | ( | stonith_t * | stonith | ) |
Definition at line 2166 of file st_client.c.
| int stonith_api_kick | ( | uint32_t | nodeid, |
| const char * | uname, | ||
| int | timeout, | ||
| bool | off | ||
| ) |
Definition at line 2352 of file st_client.c.
| stonith_t* stonith_api_new | ( | void | ) |
Definition at line 2250 of file st_client.c.
| time_t stonith_api_time | ( | uint32_t | nodeid, |
| const char * | uname, | ||
| bool | in_progress | ||
| ) |
Definition at line 2401 of file st_client.c.
| xmlNode * stonith_create_op | ( | int | call_id, |
| const char * | token, | ||
| const char * | op, | ||
| xmlNode * | data, | ||
| int | call_options | ||
| ) |
Definition at line 1393 of file st_client.c.
| bool stonith_dispatch | ( | stonith_t * | st | ) |
Definition at line 2108 of file st_client.c.
| void stonith_dump_pending_callbacks | ( | stonith_t * | stonith | ) |
Definition at line 1881 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 176 of file st_client.c.
| void stonith_history_free | ( | stonith_history_t * | history | ) |
Definition at line 1342 of file st_client.c.
| stonith_key_value_t* stonith_key_value_add | ( | stonith_key_value_t * | head, |
| const char * | key, | ||
| const char * | value | ||
| ) |
Definition at line 2304 of file st_client.c.
| void stonith_key_value_freeall | ( | stonith_key_value_t * | head, |
| int | keys, | ||
| int | values | ||
| ) |
Definition at line 2331 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 155 of file st_client.c.
| int stonith_send_command | ( | stonith_t * | stonith, |
| const char * | op, | ||
| xmlNode * | data, | ||
| xmlNode ** | output_data, | ||
| int | call_options, | ||
| int | timeout | ||
| ) |
Definition at line 1998 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 129 of file st_client.c.
1.8.13