29 remote_proxy_notify_destroy(
lrmd_t *lrmd,
const char *session_id)
74 xmlNode *wrapper = NULL;
92 xmlNode *wrapper = NULL;
139 crm_warn(
"Received a NULL msg from IPC service.");
178 const char *node_name,
const char *session_id,
const char *channel)
182 if(channel == NULL) {
183 crm_err(
"No channel specified to proxy");
184 remote_proxy_notify_destroy(lrmd, session_id);
202 if (proxy->
source == NULL) {
204 remote_proxy_notify_destroy(lrmd, session_id);
209 crm_trace(
"new remote proxy client established to %s on %s, session id %s",
210 channel, node_name, session_id);
235 remote_proxy_end_session(proxy);
249 remote_proxy_notify_destroy(lrmd, session);
255 remote_proxy_end_session(proxy);
return);
258 remote_proxy_end_session(proxy);
286 crm_err(
"Could not relay %s request %d from %s to %s for %s: %s (%d)",
297 crm_trace(
"Relayed %s request %d from %s to %s for %s",
304 xmlNode *op_reply = NULL;
307 crm_trace(
"Relaying %s request %d from %s to %s for %s",
312 crm_err(
"Could not relay %s request %d from %s to %s for %s: %s (%d)",
315 crm_trace(
"Relayed %s request %d from %s to %s for %s",
325 crm_err(
"Unknown proxy operation: %s", op);
#define CRM_CHECK(expr, failure_action)
#define PCMK__ATTRD_CMD_UPDATE_DELAY
void remote_proxy_disconnected(gpointer userdata)
xmlNode * pcmk__xml_copy(xmlNode *parent, xmlNode *src)
const char * pcmk_strerror(int rc)
#define PCMK__XA_LRMD_IPC_SESSION
#define PCMK__ATTRD_CMD_UPDATE_BOTH
#define LRMD_IPC_OP_SHUTDOWN_NACK
#define PCMK__VALUE_ATTRD
void remote_proxy_ack_shutdown(lrmd_t *lrmd)
void remote_proxy_relay_response(remote_proxy_t *proxy, xmlNode *msg, int msg_id)
#define LRMD_IPC_OP_DESTROY
#define LRMD_IPC_OP_RESPONSE
const char * crm_xml_add_int(xmlNode *node, const char *name, int value)
Create an XML attribute with specified name and integer value.
const char * pcmk__update_acl_user(xmlNode *request, const char *field, const char *peer_user)
#define PCMK__XA_LRMD_IPC_OP
const char * crm_xml_add(xmlNode *node, const char *name, const char *value)
Create an XML attribute with specified name and value.
enum crm_ais_msg_types type
void remote_proxy_nack_shutdown(lrmd_t *lrmd)
uint32_t crm_ipc_buffer_flags(crm_ipc_t *client)
int crm_element_value_int(const xmlNode *data, const char *name, int *dest)
Retrieve the integer value of an XML attribute.
Wrappers for and extensions to glib mainloop.
void remote_proxy_free(gpointer data)
remote_proxy_t * remote_proxy_new(lrmd_t *lrmd, struct ipc_client_callbacks *proxy_callbacks, const char *node_name, const char *session_id, const char *channel)
#define crm_warn(fmt, args...)
void remote_proxy_relay_event(remote_proxy_t *proxy, xmlNode *msg)
#define PCMK__XA_LRMD_IPC_MSG_ID
#define LRMD_IPC_OP_REQUEST
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
xmlNode * pcmk__xe_first_child(const xmlNode *parent, const char *node_name, const char *attr_n, const char *attr_v)
int remote_proxy_dispatch(const char *buffer, ssize_t length, gpointer userdata)
#define crm_trace(fmt, args...)
#define crm_log_xml_explicit(xml, text)
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
#define PCMK__XA_LRMD_IPC_USER
Wrappers for and extensions to libxml2.
#define PCMK__XE_LRMD_IPC_MSG
void mainloop_del_ipc_client(mainloop_io_t *client)
#define PCMK__ATTRD_CMD_UPDATE
void free_xml(xmlNode *child)
bool pcmk__str_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
xmlNode * pcmk__xml_parse(const char *input)
const char * pcmk__message_name(const char *name)
Get name to be used as identifier for cluster messages.
bool crm_ipc_connected(crm_ipc_t *client)
int lrmd_internal_proxy_send(lrmd_t *lrmd, xmlNode *msg)
#define LRMD_IPC_OP_SHUTDOWN_ACK
#define PCMK__XA_ATTR_HOST
const char * crm_ipc_name(crm_ipc_t *client)
Cluster status and scheduling.
crm_ipc_t * mainloop_get_ipc_client(mainloop_io_t *client)
#define crm_err(fmt, args...)
#define PCMK__XE_LRMD_IPC_PROXY
#define PCMK__XA_LRMD_IPC_MSG_FLAGS
#define LRMD_IPC_OP_EVENT
mainloop_io_t * mainloop_add_ipc_client(const char *name, int priority, size_t max_size, void *userdata, struct ipc_client_callbacks *callbacks)
void pcmk__xe_add_node(xmlNode *xml, const char *node, int nodeid)
xmlNode * pcmk__xe_create(xmlNode *parent, const char *name)
#define PCMK__XA_LRMD_IPC_CLIENT
#define pcmk__assert_alloc(nmemb, size)
int crm_ipc_send(crm_ipc_t *client, const xmlNode *message, enum crm_ipc_flags flags, int32_t ms_timeout, xmlNode **reply)
Send an IPC XML message.
void remote_proxy_cb(lrmd_t *lrmd, const char *node_name, xmlNode *msg)