crm_debug("Adding stonith (%d) as an input to start",
crm_devel("Adding stonith (%d) as an input to start",
stonith_constraints(node_t *node,		    action_t *stonith_op, action_t *shutdown_op,		    GListPtr *ordering_constraints){	GListPtr stop_actions = NULL;		if(shutdown_op != NULL) {		/* shutdown before stonith */		/* add the shutdown OP to the before lists so it counts as a pre-req */		crm_debug("Adding shutdown (%d) as an input to stonith (%d)",			  shutdown_op->id, stonith_op->id);				order_new(NULL, shutdown_crm, shutdown_op,			  NULL, stonith_node, stonith_op,			  pecs_must, ordering_constraints);	}		/* add the stonith OP to the before lists so it counts as a pre-req */	slist_iter(		rsc, resource_t, node->details->running_rsc, lpc,		/* make use of timeouts in the TE for cases such		 *   as this.		 * ie. the node may be cactus and unable to receive the		 *  stop let alone reply with failed.		 */		stop_actions = find_actions(rsc->actions, stop_rsc, node);		slist_iter(			action, action_t, stop_actions, lpc2,			action->discard = TRUE;			);		if(rsc->stopfail_type == pesf_block) {			/* depend on the stop action which will fail */			crm_warn("SHARED RESOURCE %s WILL REMAIN BLOCKED"				 " UNTIL CLEANED UP MANUALLY ON NODE %s",				 rsc->id, node->details->uname);			continue;					} else if(rsc->stopfail_type == pesf_ignore) {			/* nothing to do here */			crm_warn("SHARED RESOURCE %s IS NOT PROTECTED",				 rsc->id);			continue;		}				/* case pesf_stonith: */		/* remedial action:		 *   shutdown (so all other resources are		 *   stopped gracefully) and then STONITH node		 */		if(stonith_enabled == FALSE) {			/* depend on an action that will never complete */			crm_err("STONITH is not enabled in this"				" cluster but is required for "				"resource %s after a failed stop",				rsc->id);		}		crm_debug("Adding stonith (%d) as an input to start",			  stonith_op->id);				/* stonith before start */		order_new(NULL, stonith_node, stonith_op,			  rsc, start_rsc, NULL,			  pecs_must, ordering_constraints);/* 		a pointless optimization?  probably *//* 		if(shutdown_op != NULL) { *//* 			/\* the next rule is implied *\/ *//* 			continue; *//* 		} */		/* stop before stonith */		order_new(rsc, stop_rsc, NULL,			  NULL, stonith_node, stonith_op,			  pecs_must, ordering_constraints);		);		return TRUE;}