29remote_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);
250 remote_proxy_notify_destroy(lrmd, session);
256 remote_proxy_end_session(proxy);
return);
259 remote_proxy_end_session(proxy);
267 crm_warn(
"Couldn't parse controller flags from remote request: %s",
293 crm_err(
"Could not relay %s request %d from %s to %s for %s: %s (%d)",
304 crm_trace(
"Relayed %s request %d from %s to %s for %s",
311 xmlNode *op_reply = NULL;
314 crm_trace(
"Relaying %s request %d from %s to %s for %s",
319 crm_err(
"Could not relay %s request %d from %s to %s for %s: %s (%d)",
322 crm_trace(
"Relayed %s request %d from %s to %s for %s",
332 crm_err(
"Unknown proxy operation: %s", op);
const char * pcmk__update_acl_user(xmlNode *request, const char *field, const char *peer_user)
#define pcmk__assert_alloc(nmemb, size)
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
enum pcmk_ipc_server type
#define PCMK__ATTRD_CMD_UPDATE_BOTH
#define PCMK__ATTRD_CMD_UPDATE_DELAY
#define PCMK__ATTRD_CMD_UPDATE
const char * crm_ipc_name(crm_ipc_t *client)
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.
@ crm_ipc_proxied_relay_response
@ crm_ipc_proxied
ALL replies to proxied connections need to be sent as events
bool crm_ipc_connected(crm_ipc_t *client)
@ pcmk_ipc_controld
Controller.
uint32_t crm_ipc_buffer_flags(crm_ipc_t *client)
#define crm_warn(fmt, args...)
#define crm_log_xml_explicit(xml, text)
#define CRM_CHECK(expr, failure_action)
#define crm_err(fmt, args...)
#define crm_trace(fmt, args...)
#define LRMD_IPC_OP_RESPONSE
#define LRMD_IPC_OP_SHUTDOWN_ACK
#define LRMD_IPC_OP_REQUEST
#define LRMD_IPC_OP_SHUTDOWN_NACK
#define LRMD_IPC_OP_EVENT
#define LRMD_IPC_OP_DESTROY
Wrappers for and extensions to glib mainloop.
crm_ipc_t * mainloop_get_ipc_client(mainloop_io_t *client)
mainloop_io_t * mainloop_add_ipc_client(const char *name, int priority, size_t max_size, void *userdata, struct ipc_client_callbacks *callbacks)
void mainloop_del_ipc_client(mainloop_io_t *client)
#define PCMK__VALUE_ATTRD
int lrmd_internal_proxy_send(lrmd_t *lrmd, xmlNode *msg)
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)
void remote_proxy_cb(lrmd_t *lrmd, const char *node_name, xmlNode *msg)
void remote_proxy_nack_shutdown(lrmd_t *lrmd)
void remote_proxy_free(gpointer data)
void remote_proxy_relay_response(remote_proxy_t *proxy, xmlNode *msg, int msg_id)
void remote_proxy_disconnected(gpointer userdata)
void remote_proxy_ack_shutdown(lrmd_t *lrmd)
int remote_proxy_dispatch(const char *buffer, ssize_t length, gpointer userdata)
void remote_proxy_relay_event(remote_proxy_t *proxy, xmlNode *msg)
const char * pcmk_strerror(int rc)
const char * pcmk_rc_str(int rc)
Get a user-friendly description of a return code.
#define pcmk__assert(expr)
enum pcmk_ipc_server pcmk__parse_server(const char *text)
Cluster status and scheduling.
bool pcmk__str_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
Wrappers for and extensions to libxml2.
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
int crm_element_value_int(const xmlNode *data, const char *name, int *dest)
Retrieve the integer value of an XML attribute.
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 * crm_xml_add(xmlNode *node, const char *name, const char *value)
Create an XML attribute with specified name and value.
xmlNode * pcmk__xe_first_child(const xmlNode *parent, const char *node_name, const char *attr_n, const char *attr_v)
int pcmk__xe_get_flags(const xmlNode *xml, const char *name, uint32_t *dest, uint32_t default_value)
xmlNode * pcmk__xe_create(xmlNode *parent, const char *name)
xmlNode * pcmk__xml_copy(xmlNode *parent, xmlNode *src)
void pcmk__xml_free(xmlNode *xml)
xmlNode * pcmk__xml_parse(const char *input)
#define PCMK__XA_LRMD_IPC_SESSION
#define PCMK__XA_LRMD_IPC_USER
#define PCMK__XE_LRMD_IPC_MSG
#define PCMK__XA_LRMD_IPC_CLIENT
#define PCMK__XA_LRMD_IPC_OP
#define PCMK__XA_LRMD_IPC_MSG_FLAGS
#define PCMK__XE_LRMD_IPC_PROXY
#define PCMK__XA_ATTR_HOST
#define PCMK__XA_LRMD_IPC_MSG_ID