pacemaker
2.1.2-ada5c3b36
Scalable High-Availability cluster resource manager
|
Resource agent executor. More...
Go to the source code of this file.
Data Structures | |
struct | lrmd_key_value_s |
struct | lrmd_event_data_s |
struct | lrmd_rsc_info_s |
struct | lrmd_op_info_s |
struct | lrmd_list_s |
struct | lrmd_api_operations_s |
struct | lrmd_s |
Macros | |
#define | LRMD_PROTOCOL_VERSION "1.1" |
#define | LRMD_MIN_PROTOCOL_VERSION "1.0" |
#define | DEFAULT_REMOTE_KEY_LOCATION PACEMAKER_CONFIG_DIR "/authkey" |
#define | ALT_REMOTE_KEY_LOCATION "/etc/corosync/authkey" |
#define | DEFAULT_REMOTE_PORT 3121 |
#define | DEFAULT_REMOTE_USERNAME "lrmd" |
#define | F_LRMD_OPERATION "lrmd_op" |
#define | F_LRMD_CLIENTNAME "lrmd_clientname" |
#define | F_LRMD_IS_IPC_PROVIDER "lrmd_is_ipc_provider" |
#define | F_LRMD_CLIENTID "lrmd_clientid" |
#define | F_LRMD_PROTOCOL_VERSION "lrmd_protocol_version" |
#define | F_LRMD_REMOTE_MSG_TYPE "lrmd_remote_msg_type" |
#define | F_LRMD_REMOTE_MSG_ID "lrmd_remote_msg_id" |
#define | F_LRMD_CALLBACK_TOKEN "lrmd_async_id" |
#define | F_LRMD_CALLID "lrmd_callid" |
#define | F_LRMD_CALLOPTS "lrmd_callopt" |
#define | F_LRMD_CALLDATA "lrmd_calldata" |
#define | F_LRMD_RC "lrmd_rc" |
#define | F_LRMD_EXEC_RC "lrmd_exec_rc" |
#define | F_LRMD_OP_STATUS "lrmd_exec_op_status" |
#define | F_LRMD_TIMEOUT "lrmd_timeout" |
#define | F_LRMD_WATCHDOG "lrmd_watchdog" |
#define | F_LRMD_CLASS "lrmd_class" |
#define | F_LRMD_PROVIDER "lrmd_provider" |
#define | F_LRMD_TYPE "lrmd_type" |
#define | F_LRMD_ORIGIN "lrmd_origin" |
#define | F_LRMD_RSC_RUN_TIME "lrmd_run_time" |
#define | F_LRMD_RSC_RCCHANGE_TIME "lrmd_rcchange_time" |
#define | F_LRMD_RSC_EXEC_TIME "lrmd_exec_time" |
#define | F_LRMD_RSC_QUEUE_TIME "lrmd_queue_time" |
#define | F_LRMD_RSC_ID "lrmd_rsc_id" |
#define | F_LRMD_RSC_ACTION "lrmd_rsc_action" |
#define | F_LRMD_RSC_USERDATA_STR "lrmd_rsc_userdata_str" |
#define | F_LRMD_RSC_OUTPUT "lrmd_rsc_output" |
#define | F_LRMD_RSC_EXIT_REASON "lrmd_rsc_exit_reason" |
#define | F_LRMD_RSC_START_DELAY "lrmd_rsc_start_delay" |
#define | F_LRMD_RSC_INTERVAL "lrmd_rsc_interval" |
#define | F_LRMD_RSC_DELETED "lrmd_rsc_deleted" |
#define | F_LRMD_RSC "lrmd_rsc" |
#define | F_LRMD_ALERT_ID "lrmd_alert_id" |
#define | F_LRMD_ALERT_PATH "lrmd_alert_path" |
#define | F_LRMD_ALERT "lrmd_alert" |
#define | LRMD_OP_RSC_REG "lrmd_rsc_register" |
#define | LRMD_OP_RSC_EXEC "lrmd_rsc_exec" |
#define | LRMD_OP_RSC_CANCEL "lrmd_rsc_cancel" |
#define | LRMD_OP_RSC_UNREG "lrmd_rsc_unregister" |
#define | LRMD_OP_RSC_INFO "lrmd_rsc_info" |
#define | LRMD_OP_RSC_METADATA "lrmd_rsc_metadata" |
#define | LRMD_OP_POKE "lrmd_rsc_poke" |
#define | LRMD_OP_NEW_CLIENT "lrmd_rsc_new_client" |
#define | LRMD_OP_CHECK "lrmd_check" |
#define | LRMD_OP_ALERT_EXEC "lrmd_alert_exec" |
#define | LRMD_OP_GET_RECURRING "lrmd_get_recurring" |
#define | LRMD_IPC_OP_NEW "new" |
#define | LRMD_IPC_OP_DESTROY "destroy" |
#define | LRMD_IPC_OP_EVENT "event" |
#define | LRMD_IPC_OP_REQUEST "request" |
#define | LRMD_IPC_OP_RESPONSE "response" |
#define | LRMD_IPC_OP_SHUTDOWN_REQ "shutdown_req" |
#define | LRMD_IPC_OP_SHUTDOWN_ACK "shutdown_ack" |
#define | LRMD_IPC_OP_SHUTDOWN_NACK "shutdown_nack" |
#define | F_LRMD_IPC_OP "lrmd_ipc_op" |
#define | F_LRMD_IPC_IPC_SERVER "lrmd_ipc_server" |
#define | F_LRMD_IPC_SESSION "lrmd_ipc_session" |
#define | F_LRMD_IPC_CLIENT "lrmd_ipc_client" |
#define | F_LRMD_IPC_USER "lrmd_ipc_user" |
#define | F_LRMD_IPC_MSG "lrmd_ipc_msg" |
#define | F_LRMD_IPC_MSG_ID "lrmd_ipc_msg_id" |
#define | F_LRMD_IPC_MSG_FLAGS "lrmd_ipc_msg_flags" |
#define | T_LRMD "lrmd" |
#define | T_LRMD_REPLY "lrmd_reply" |
#define | T_LRMD_NOTIFY "lrmd_notify" |
#define | T_LRMD_IPC_PROXY "lrmd_ipc_proxy" |
#define | T_LRMD_RSC_OP "lrmd_rsc_op" |
Typedefs | |
typedef struct lrmd_s | lrmd_t |
typedef struct lrmd_key_value_s | lrmd_key_value_t |
typedef struct lrmd_event_data_s | lrmd_event_data_t |
typedef struct lrmd_rsc_info_s | lrmd_rsc_info_t |
typedef struct lrmd_op_info_s | lrmd_op_info_t |
typedef void(* | lrmd_event_callback) (lrmd_event_data_t *event) |
typedef struct lrmd_list_s | lrmd_list_t |
typedef struct lrmd_api_operations_s | lrmd_api_operations_t |
Enumerations | |
enum | lrmd_call_options { lrmd_opt_none = 0x00000000, lrmd_opt_notify_orig_only = 0x00000002, lrmd_opt_drop_recurring = 0x00000003, lrmd_opt_notify_changes_only = 0x00000004 } |
enum | lrmd_callback_event { lrmd_event_register, lrmd_event_unregister, lrmd_event_exec_complete, lrmd_event_disconnect, lrmd_event_connect, lrmd_event_poke, lrmd_event_new_client } |
Functions | |
lrmd_t * | lrmd_api_new (void) |
Create a new connection to the local executor. More... | |
lrmd_t * | lrmd_remote_api_new (const char *nodename, const char *server, int port) |
Create a new TLS connection to a remote executor. More... | |
bool | lrmd_dispatch (lrmd_t *lrmd) |
Use after lrmd_poll returns 1 to read and dispatch a message. More... | |
int | lrmd_poll (lrmd_t *lrmd, int timeout) |
Poll for a specified timeout period to determine if a message is ready for dispatch. More... | |
void | lrmd_api_delete (lrmd_t *lrmd) |
Destroy executor connection object. More... | |
lrmd_key_value_t * | lrmd_key_value_add (lrmd_key_value_t *kvp, const char *key, const char *value) |
lrmd_event_data_t * | lrmd_new_event (const char *rsc_id, const char *task, guint interval_ms) |
lrmd_event_data_t * | lrmd_copy_event (lrmd_event_data_t *event) |
void | lrmd_free_event (lrmd_event_data_t *event) |
Free an executor event. More... | |
lrmd_rsc_info_t * | lrmd_new_rsc_info (const char *rsc_id, const char *standard, const char *provider, const char *type) |
lrmd_rsc_info_t * | lrmd_copy_rsc_info (lrmd_rsc_info_t *rsc_info) |
void | lrmd_free_rsc_info (lrmd_rsc_info_t *rsc_info) |
void | lrmd_free_op_info (lrmd_op_info_t *op_info) |
void | lrmd_list_freeall (lrmd_list_t *head) |
void | lrmd_key_value_freeall (lrmd_key_value_t *head) |
Resource agent executor.
Definition in file lrmd.h.
#define DEFAULT_REMOTE_KEY_LOCATION PACEMAKER_CONFIG_DIR "/authkey" |
typedef struct lrmd_api_operations_s lrmd_api_operations_t |
typedef void(* lrmd_event_callback) (lrmd_event_data_t *event) |
typedef struct lrmd_event_data_s lrmd_event_data_t |
typedef struct lrmd_key_value_s lrmd_key_value_t |
typedef struct lrmd_list_s lrmd_list_t |
typedef struct lrmd_op_info_s lrmd_op_info_t |
typedef struct lrmd_rsc_info_s lrmd_rsc_info_t |
enum lrmd_call_options |
enum lrmd_callback_event |
void lrmd_api_delete | ( | lrmd_t * | lrmd | ) |
Destroy executor connection object.
Definition at line 2329 of file lrmd_client.c.
lrmd_t* lrmd_api_new | ( | void | ) |
Create a new connection to the local executor.
Definition at line 2311 of file lrmd_client.c.
lrmd_event_data_t* lrmd_copy_event | ( | lrmd_event_data_t * | event | ) |
Definition at line 214 of file lrmd_client.c.
lrmd_rsc_info_t* lrmd_copy_rsc_info | ( | lrmd_rsc_info_t * | rsc_info | ) |
Definition at line 1745 of file lrmd_client.c.
bool lrmd_dispatch | ( | lrmd_t * | lrmd | ) |
Use after lrmd_poll returns 1 to read and dispatch a message.
[in,out] | lrmd | Executor connection object |
Definition at line 478 of file lrmd_client.c.
void lrmd_free_event | ( | lrmd_event_data_t * | event | ) |
Free an executor event.
[in] | Executor | event object to free |
Definition at line 242 of file lrmd_client.c.
void lrmd_free_op_info | ( | lrmd_op_info_t * | op_info | ) |
Definition at line 1802 of file lrmd_client.c.
void lrmd_free_rsc_info | ( | lrmd_rsc_info_t * | rsc_info | ) |
Definition at line 1752 of file lrmd_client.c.
lrmd_key_value_t* lrmd_key_value_add | ( | lrmd_key_value_t * | kvp, |
const char * | key, | ||
const char * | value | ||
) |
Definition at line 147 of file lrmd_client.c.
void lrmd_key_value_freeall | ( | lrmd_key_value_t * | head | ) |
Definition at line 170 of file lrmd_client.c.
void lrmd_list_freeall | ( | lrmd_list_t * | head | ) |
Definition at line 132 of file lrmd_client.c.
lrmd_event_data_t* lrmd_new_event | ( | const char * | rsc_id, |
const char * | task, | ||
guint | interval_ms | ||
) |
Create a new lrmd_event_data_t object
[in] | rsc_id | ID of resource involved in event |
[in] | task | Action name |
[in] | interval_ms | Action interval |
Definition at line 196 of file lrmd_client.c.
lrmd_rsc_info_t* lrmd_new_rsc_info | ( | const char * | rsc_id, |
const char * | standard, | ||
const char * | provider, | ||
const char * | type | ||
) |
Definition at line 1719 of file lrmd_client.c.
int lrmd_poll | ( | lrmd_t * | lrmd, |
int | timeout | ||
) |
Poll for a specified timeout period to determine if a message is ready for dispatch.
1 | Message is ready |
0 | Timeout occurred |
negative | errno Error occurred |
Definition at line 444 of file lrmd_client.c.
lrmd_t* lrmd_remote_api_new | ( | const char * | nodename, |
const char * | server, | ||
int | port | ||
) |
Create a new TLS connection to a remote executor.
nodename | name of remote node identified with this connection |
server | name of server to connect to |
port | port number to connect to |
Definition at line 2320 of file lrmd_client.c.