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

Function validate_order_resources

pengine/constraints.c:715–740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

713}
714
715static int
716validate_order_resources(resource_t *lh_rsc, resource_t *rh_rsc)
717{
718 enum contains_stonith_res lh_flag = contains_stonith(lh_rsc);
719 enum contains_stonith_res rh_flag = contains_stonith(rh_rsc);
720
721 if (lh_flag == contains_stonith_mixed) {
722 crm_config_err("Order constraint, LH (%s) then RH (%s), can not be applied. LH contains stonith resources mixed with other resource classes.",
723 lh_rsc->id, rh_rsc->id);
724 return -1;
725 } else if (rh_flag == contains_stonith_mixed) {
726 crm_config_err("Order constraint, LH (%s) then RH (%s), can not be applied. RH contains stonith resources mixed with other resource classes.",
727 lh_rsc->id, rh_rsc->id);
728 return -1;
729 } else if (lh_flag == contains_stonith_true && (lh_flag != rh_flag)) {
730 crm_config_err("Order constraint, LH (%s) then RH (%s), can not be applied. LH is of class stonith and RH is not.",
731 lh_rsc->id, rh_rsc->id);
732 return -1;
733 } else if (rh_flag == contains_stonith_true && (rh_flag != lh_flag)) {
734 crm_config_err("Order constraint, LH (%s) then RH (%s), can not be applied. RH is of class stonith and LH is not.",
735 lh_rsc->id, rh_rsc->id);
736 return -1;
737 }
738
739 return 0;
740}
741
742/* LHS before RHS */
743int

Callers 1

new_rsc_orderFunction · 0.85

Calls 1

contains_stonithFunction · 0.85

Tested by

no test coverage detected