MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / forward_request

Function forward_request

cib/callbacks.c:552–575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

550}
551
552static void
553forward_request(xmlNode * request, cib_client_t * cib_client, int call_options)
554{
555 const char *op = crm_element_value(request, F_CIB_OPERATION);
556 const char *host = crm_element_value(request, F_CIB_HOST);
557
558 crm_xml_add(request, F_CIB_DELEGATED, cib_our_uname);
559
560 if (host != NULL) {
561 crm_trace("Forwarding %s op to %s", op, host);
562 send_cluster_message(crm_get_peer(0, host), crm_msg_cib, request, FALSE);
563
564 } else {
565 crm_trace("Forwarding %s op to master instance", op);
566 send_cluster_message(NULL, crm_msg_cib, request, FALSE);
567 }
568
569 /* Return the request to its original state */
570 xml_remove_prop(request, F_CIB_DELEGATED);
571
572 if (call_options & cib_discard_reply) {
573 crm_trace("Client not interested in reply");
574 }
575}
576
577static gboolean
578send_peer_reply(xmlNode * msg, xmlNode * result_diff, const char *originator, gboolean broadcast)

Callers 1

cib_process_requestFunction · 0.85

Calls 5

crm_element_valueFunction · 0.85
crm_xml_addFunction · 0.85
send_cluster_messageFunction · 0.85
crm_get_peerFunction · 0.85
xml_remove_propFunction · 0.85

Tested by

no test coverage detected