pacemaker
2.1.7-0f7f88312f
Scalable High-Availability cluster resource manager
|
Resource agent executor. More...
#include <stdbool.h>
#include <glib.h>
#include <crm_config.h>
#include <crm/lrmd_events.h>
#include <crm/services.h>
Go to the source code of this file.
Data Structures | |
struct | lrmd_key_value_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_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 = 0, lrmd_opt_notify_orig_only = (1 << 1), lrmd_opt_drop_recurring = 0x00000003, lrmd_opt_notify_changes_only = (1 << 2) } |
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) |
Check whether a message is available on an executor connection. 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_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_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 |
void lrmd_api_delete | ( | lrmd_t * | lrmd | ) |
Destroy executor connection object.
[in,out] | lrmd | Executor connection object to destroy |
Definition at line 2353 of file lrmd_client.c.
lrmd_t* lrmd_api_new | ( | void | ) |
Create a new connection to the local executor.
Definition at line 2335 of file lrmd_client.c.
lrmd_rsc_info_t* lrmd_copy_rsc_info | ( | lrmd_rsc_info_t * | rsc_info | ) |
Definition at line 1769 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 481 of file lrmd_client.c.
void lrmd_free_op_info | ( | lrmd_op_info_t * | op_info | ) |
Definition at line 1826 of file lrmd_client.c.
void lrmd_free_rsc_info | ( | lrmd_rsc_info_t * | rsc_info | ) |
Definition at line 1776 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 146 of file lrmd_client.c.
void lrmd_key_value_freeall | ( | lrmd_key_value_t * | head | ) |
Definition at line 169 of file lrmd_client.c.
void lrmd_list_freeall | ( | lrmd_list_t * | head | ) |
Definition at line 131 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 1755 of file lrmd_client.c.
int lrmd_poll | ( | lrmd_t * | lrmd, |
int | timeout | ||
) |
Check whether a message is available on an executor connection.
[in,out] | lrmd | Executor connection object to check |
[in] | timeout | Currently ignored |
1 | Message is ready |
0 | Timeout occurred |
negative | errno Error occurred |
Definition at line 447 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.
[in] | nodename | Name of remote node identified with this connection |
[in] | server | Hostname to connect to |
[in] | port | Port number to connect to (or 0 to use default) |
nodename
and server
is non-NULL, it will be used for both purposes. If both are NULL, a local IPC connection will be created instead. Definition at line 2344 of file lrmd_client.c.