pacemaker
2.1.5-b7adf64e51
Scalable High-Availability cluster resource manager
|
#include <crm_internal.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <glib.h>
#include <dirent.h>
#include <crm/crm.h>
#include <crm/lrmd.h>
#include <crm/lrmd_internal.h>
#include <crm/services.h>
#include <crm/services_internal.h>
#include <crm/common/mainloop.h>
#include <crm/common/ipc_internal.h>
#include <crm/common/remote_internal.h>
#include <crm/msg_xml.h>
#include <crm/stonith-ng.h>
#include <crm/fencing/internal.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <arpa/inet.h>
#include <netdb.h>
Go to the source code of this file.
Macros | |
#define | MAX_TLS_RECV_WAIT 10000 |
Typedefs | |
typedef struct lrmd_private_s | lrmd_private_t |
Functions | |
CRM_TRACE_INIT_DATA (lrmd) | |
int | lrmd_internal_proxy_send (lrmd_t *lrmd, xmlNode *msg) |
void | lrmd_internal_set_proxy_callback (lrmd_t *lrmd, void *userdata, void(*callback)(lrmd_t *lrmd, void *userdata, xmlNode *msg)) |
void | lrmd_list_freeall (lrmd_list_t *head) |
lrmd_key_value_t * | lrmd_key_value_add (lrmd_key_value_t *head, const char *key, const char *value) |
void | lrmd_key_value_freeall (lrmd_key_value_t *head) |
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... | |
int | lrmd_poll (lrmd_t *lrmd, int timeout) |
Check whether a message is available on an executor connection. More... | |
bool | lrmd_dispatch (lrmd_t *lrmd) |
Use after lrmd_poll returns 1 to read and dispatch a message. More... | |
int | lrmd__validate_remote_settings (lrmd_t *lrmd, GHashTable *hash) |
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) |
int | lrmd__new (lrmd_t **api, const char *nodename, const char *server, int port) |
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... | |
void | lrmd_api_delete (lrmd_t *lrmd) |
Destroy executor connection object. More... | |
int | lrmd__metadata_async (lrmd_rsc_info_t *rsc, void(*callback)(int pid, const pcmk__action_result_t *result, void *user_data), void *user_data) |
void | lrmd__set_result (lrmd_event_data_t *event, enum ocf_exitcode rc, int op_status, const char *exit_reason) |
void | lrmd__reset_result (lrmd_event_data_t *event) |
#define MAX_TLS_RECV_WAIT 10000 |
Definition at line 50 of file lrmd_client.c.
typedef struct lrmd_private_s lrmd_private_t |
CRM_TRACE_INIT_DATA | ( | lrmd | ) |
int lrmd__metadata_async | ( | lrmd_rsc_info_t * | rsc, |
void(*)(int pid, const pcmk__action_result_t *result, void *user_data) | callback, | ||
void * | user_data | ||
) |
Definition at line 2392 of file lrmd_client.c.
int lrmd__new | ( | lrmd_t ** | api, |
const char * | nodename, | ||
const char * | server, | ||
int | port | ||
) |
Definition at line 2214 of file lrmd_client.c.
void lrmd__reset_result | ( | lrmd_event_data_t * | event | ) |
Definition at line 2491 of file lrmd_client.c.
void lrmd__set_result | ( | lrmd_event_data_t * | event, |
enum ocf_exitcode | rc, | ||
int | op_status, | ||
const char * | exit_reason | ||
) |
Definition at line 2472 of file lrmd_client.c.
int lrmd__validate_remote_settings | ( | lrmd_t * | lrmd, |
GHashTable * | hash | ||
) |
Definition at line 932 of file lrmd_client.c.
void lrmd_api_delete | ( | lrmd_t * | lrmd | ) |
Destroy executor connection object.
[in,out] | lrmd | Executor connection object to destroy |
Definition at line 2320 of file lrmd_client.c.
lrmd_t* lrmd_api_new | ( | void | ) |
Create a new connection to the local executor.
Definition at line 2302 of file lrmd_client.c.
lrmd_event_data_t* lrmd_copy_event | ( | lrmd_event_data_t * | event | ) |
Definition at line 207 of file lrmd_client.c.
lrmd_rsc_info_t* lrmd_copy_rsc_info | ( | lrmd_rsc_info_t * | rsc_info | ) |
Definition at line 1736 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_event | ( | lrmd_event_data_t * | event | ) |
Free an executor event.
[in] | Executor | event object to free |
Definition at line 243 of file lrmd_client.c.
void lrmd_free_op_info | ( | lrmd_op_info_t * | op_info | ) |
Definition at line 1793 of file lrmd_client.c.
void lrmd_free_rsc_info | ( | lrmd_rsc_info_t * | rsc_info | ) |
Definition at line 1743 of file lrmd_client.c.
int lrmd_internal_proxy_send | ( | lrmd_t * | lrmd, |
xmlNode * | msg | ||
) |
Definition at line 1894 of file lrmd_client.c.
void lrmd_internal_set_proxy_callback | ( | lrmd_t * | lrmd, |
void * | userdata, | ||
void(*)(lrmd_t *lrmd, void *userdata, xmlNode *msg) | callback | ||
) |
Definition at line 1874 of file lrmd_client.c.
lrmd_key_value_t* lrmd_key_value_add | ( | lrmd_key_value_t * | head, |
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_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 195 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 1722 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 2311 of file lrmd_client.c.