rsc, stop_key(rsc), NULL,
rsc, start_key(rsc), NULL,
stonith_constraints(node_t *node,		    action_t *stonith_op, action_t *shutdown_op,		    pe_working_set_t *data_set){	GListPtr stop_actions = NULL;	gboolean run_unprotected = TRUE;		if(shutdown_op != NULL) {		/* stop everything we can via shutdown_constraints() and then		 *   shoot the node... the shutdown has been superceeded		 */		shutdown_op->pseudo = TRUE;		shutdown_op->runnable = TRUE;		/* shutdown before stonith */		/* Give any resources a chance to shutdown normally */		crm_debug_4("Adding shutdown (%d) as an input to stonith (%d)",			  shutdown_op->id, stonith_op->id);				custom_action_order(			NULL, crm_strdup(CRM_OP_SHUTDOWN), shutdown_op,			NULL, crm_strdup(CRM_OP_FENCE), stonith_op,			pe_ordering_manditory, data_set);			}	/*	 * Make sure the stonith OP occurs before we start any shared resources	 */	slist_iter(		rsc, resource_t, data_set->resources, lpc,		slist_iter(action, action_t, rsc->actions, lpc2,			   if(action->needs != rsc_req_stonith) {				   continue;			   }			   if(stonith_op != NULL) {				   custom_action_order(					   NULL, crm_strdup(CRM_OP_FENCE), stonith_op,					   rsc, NULL, action,					   pe_ordering_manditory, data_set);				   			   } else if(run_unprotected == FALSE) {				   /* mark the start unrunnable */				   action->runnable = FALSE;				   			   } else {				   pe_err("SHARED RESOURCE %s IS NOT PROTECTED:"					  " Stonith disabled", rsc->id);			   }			);		);		/* add the stonith OP as a stop pre-req and the mark the stop	 * as a pseudo op - since its now redundant	 */	slist_iter(		rsc, resource_t, node->details->running_rsc, lpc,		if(rsc->is_managed == FALSE) {			crm_debug_2("Skipping fencing constraints for unmanaged resource: %s", rsc->id);					} else if(stonith_op != NULL) {			char *key = stop_key(rsc);			stop_actions = find_actions(rsc->actions, key, node);			crm_free(key);						slist_iter(				action, action_t, stop_actions, lpc2,				if(node->details->online == FALSE				   || rsc->failed) {					crm_info("Stop of failed resource %s is"						 " implict after %s is fenced",						 rsc->id, node->details->uname);					/* the stop would never complete and is					 * now implied by the stonith operation					 */					action->pseudo = TRUE;					action->runnable = TRUE;					custom_action_order(						NULL, crm_strdup(CRM_OP_FENCE),stonith_op,						rsc, stop_key(rsc), NULL,						pe_ordering_manditory, data_set);				} else {					crm_info("Moving healthy resource %s"						 " off %s before fencing",						 rsc->id, node->details->uname);										/* stop healthy resources before the					 * stonith op					 */					custom_action_order(						rsc, stop_key(rsc), NULL,						NULL,crm_strdup(CRM_OP_FENCE),stonith_op,						pe_ordering_manditory, data_set);				}				);			crm_debug_4("Adding stonith (%d) as an input to stop",				  stonith_op->id);			/* 		} else if((rsc->unclean || node->details->unclean) *//* 			  && rsc->stopfail_type == pesf_block) { */			/* 			/\* depend on the stop action which will fail *\/ *//* 			pe_err("SHARED RESOURCE %s WILL REMAIN BLOCKED" *//* 				 " ON NODE %s UNTIL %s", *//* 				rsc->id, node->details->uname, *//* 				data_set->stonith_enabled?"QUORUM RETURNS":"CLEANED UP MANUALLY"); *//* 			continue; */			/* 		} else if((rsc->unclean || node->details->unclean) *//* 			  && rsc->stopfail_type == pesf_ignore) { *//* 			/\* nothing to do here *\/ *//* 			pe_err("SHARED RESOURCE %s IS NOT PROTECTED", rsc->id); *//* 			continue; */		}		);		return TRUE;}