| 678 | } |
| 679 | |
| 680 | static gboolean |
| 681 | build_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 | |
| 715 | gboolean |
| 716 | is_rsc_active(const char *rsc_id) |
no test coverage detected