29 remote_proxy_notify_destroy(
lrmd_t *lrmd,
const char *session_id)
129 crm_warn(
"Received a NULL msg from IPC service.");
168 const char *node_name,
const char *session_id,
const char *channel)
172 if(channel == NULL) {
173 crm_err(
"No channel specified to proxy");
174 remote_proxy_notify_destroy(lrmd, session_id);
192 if (proxy->
source == NULL) {
194 remote_proxy_notify_destroy(lrmd, session_id);
199 crm_trace(
"new remote proxy client established to %s on %s, session id %s",
200 channel, node_name, session_id);
225 remote_proxy_end_session(proxy);
236 remote_proxy_notify_destroy(lrmd, session);
242 remote_proxy_end_session(proxy);
return);
245 remote_proxy_end_session(proxy);
274 crm_err(
"Could not relay %s request %d from %s to %s for %s: %s (%d)",
285 crm_trace(
"Relayed %s request %d from %s to %s for %s",
292 xmlNode *op_reply = NULL;
295 crm_trace(
"Relaying %s request %d from %s to %s for %s",
300 crm_err(
"Could not relay %s request %d from %s to %s for %s: %s (%d)",
303 crm_trace(
"Relayed %s request %d from %s to %s for %s",
313 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)
const char * pcmk_strerror(int rc)
#define PCMK__ATTRD_CMD_UPDATE_BOTH
#define F_LRMD_IPC_CLIENT
#define LRMD_IPC_OP_SHUTDOWN_NACK
#define F_LRMD_IPC_SESSION
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)
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.
xmlNode * string2xml(const char *input)
#define F_LRMD_IPC_MSG_ID
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 LRMD_IPC_OP_REQUEST
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
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.
xmlNode * create_xml_node(xmlNode *parent, const char *name)
void mainloop_del_ipc_client(mainloop_io_t *client)
#define PCMK__ATTRD_CMD_UPDATE
gboolean add_message_xml(xmlNode *msg, const char *field, xmlNode *xml)
void free_xml(xmlNode *child)
bool pcmk__str_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
xmlNode * get_message_xml(const xmlNode *msg, const char *field)
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 F_LRMD_IPC_MSG_FLAGS
#define PCMK__XA_ATTR_NODE_NAME
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 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)
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)