crm_debug_2("%sColocating %s with %s",
crm_debug_2("%sColocating %s with %s (%s)",
void native_rsc_colocation_rh(	resource_t *rsc_lh, resource_t *rsc_rh, rsc_colocation_t *constraint){	gboolean do_check = FALSE;	gboolean update_lh = FALSE;	gboolean update_rh = FALSE;		native_variant_data_t *native_data_lh = NULL;	native_variant_data_t *native_data_rh = NULL;	get_native_variant_data(native_data_lh, rsc_lh);	get_native_variant_data(native_data_rh, rsc_rh);		crm_debug_2("%sColocating %s with %s",		    constraint->strength == pecs_must?"":"Anti-",		    rsc_lh->id, rsc_rh->id);		if(constraint->strength == pecs_ignore		|| constraint->strength == pecs_startstop){		crm_debug_4("Skipping constraint type %d", constraint->strength);		return;	}	if(rsc_lh->provisional && rsc_rh->provisional) {		if(constraint->strength == pecs_must) {			/* update effective_priorities */			native_rsc_colocation_rh_must(				rsc_lh, update_lh, rsc_rh, update_rh);		} else {			/* nothing */			crm_debug_4(				"Skipping constraint, both sides provisional");		}		return;	} else if( (!rsc_lh->provisional) && (!rsc_rh->provisional)		   && (!native_data_lh->color->details->pending)		   && (!native_data_rh->color->details->pending) ) {		/* error check */		do_check = TRUE;		if(rsc_lh->effective_priority < rsc_rh->effective_priority) {			update_lh = TRUE;					} else if(rsc_lh->effective_priority			  > rsc_rh->effective_priority) {			update_rh = TRUE;		} else {			update_lh = TRUE;			update_rh = TRUE;		}	} else if(rsc_lh->provisional == FALSE		  && native_data_lh->color->details->pending == FALSE) {		/* update _them_    : postproc color version */		update_rh = TRUE;			} else if(rsc_rh->provisional == FALSE		  && native_data_rh->color->details->pending == FALSE) {		/* update _us_  : postproc color alt version */		update_lh = TRUE;	} else if(rsc_lh->provisional == FALSE) {		/* update _them_    : preproc version */		update_rh = TRUE;			} else if(rsc_rh->provisional == FALSE) {		/* update _us_  : postproc version */		update_lh = TRUE;	} else {		pe_warn("Un-expected combination of inputs");		return;	}		if(update_lh) {		crm_debug_4("Updating LHS");	}	if(update_rh) {		crm_debug_4("Updating RHS");	}			if(do_check) {		if(native_constraint_violated(			   rsc_lh, rsc_rh, constraint) == FALSE) {			crm_debug_4("Constraint satisfied");			return;		}		/* else constraint cant be satisified */		pe_warn("Constraint %s could not be satisfied",			 constraint->id);				if(update_lh) {			pe_warn("Marking resource %s unrunnable as a result",				 rsc_lh->id);			rsc_lh->runnable = FALSE;		}		if(update_rh) {			pe_warn("Marking resource %s unrunnable as a result",				 rsc_rh->id);			rsc_rh->runnable = FALSE;		}			}	if(constraint->strength == pecs_must) {		native_rsc_colocation_rh_must(			rsc_lh, update_lh, rsc_rh, update_rh);		return;			} else if(constraint->strength != pecs_must_not) {		/* unknown type */		pe_err("Unknown constraint type %d", constraint->strength);		return;	}	native_rsc_colocation_rh_mustnot(rsc_lh, update_lh,rsc_rh, update_rh);}