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

Function build_operation_update

crmd/lrm.c:680–713  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

678}
679
680static gboolean
681build_operation_update(xmlNode * parent, lrmd_rsc_info_t * rsc, lrmd_event_data_t * op, const char *src)
682{
683 int target_rc = 0;
684 xmlNode *xml_op = NULL;
685 const char *caller_version = CRM_FEATURE_SET;
686
687 if (op == NULL) {
688 return FALSE;
689
690 } else if (AM_I_DC) {
691
692 } else if (fsa_our_dc_version != NULL) {
693 caller_version = fsa_our_dc_version;
694 } else if (op->params == NULL) {
695 caller_version = fsa_our_dc_version;
696 } else {
697 /* there is a small risk in formerly mixed clusters that
698 * it will be sub-optimal.
699 * however with our upgrade policy, the update we send
700 * should still be completely supported anyway
701 */
702 caller_version = g_hash_table_lookup(op->params, XML_ATTR_CRM_VERSION);
703 crm_debug("Falling back to operation originator version: %s", caller_version);
704 }
705
706 target_rc = rsc_op_expected_rc(op);
707 xml_op = create_operation_update(parent, op, caller_version, target_rc, src, LOG_DEBUG);
708
709 if (xml_op) {
710 append_restart_list(rsc, op, xml_op, caller_version);
711 }
712 return TRUE;
713}
714
715gboolean
716is_rsc_active(const char *rsc_id)

Callers 3

build_active_RAsFunction · 0.85
send_direct_ackFunction · 0.85
do_update_resourceFunction · 0.85

Calls 3

rsc_op_expected_rcFunction · 0.85
create_operation_updateFunction · 0.85
append_restart_listFunction · 0.85

Tested by

no test coverage detected