value = crm_element_value(action->rsc->xml, "on_stopfail");
value = g_hash_table_lookup( action->rsc->parameters, "on_stopfail");
unpack_operation(	action_t *action, crm_data_t *xml_obj, pe_working_set_t* data_set){	int lpc = 0;	const char *value = NULL;	const char *fields[] = {		"interval",		"timeout",		"start_delay",	};	CRM_DEV_ASSERT(action->rsc != NULL);		if(xml_obj != NULL) {		value = crm_element_value(xml_obj, "prereq");	}	if(value == NULL && safe_str_eq(action->task, CRMD_ACTION_START)) {		value = crm_element_value(action->rsc->xml, "start_prereq");	}		if(value == NULL && safe_str_neq(action->task, CRMD_ACTION_START)) {		/* todo: integrate stop as an option? */		action->needs = rsc_req_nothing;		value = "nothing (default)";	} else if(safe_str_eq(value, "nothing")) {		action->needs = rsc_req_nothing;	} else if(safe_str_eq(value, "quorum")) {		action->needs = rsc_req_quorum;	} else if(safe_str_eq(value, "fencing")) {		action->needs = rsc_req_stonith;			} else if(data_set->no_quorum_policy == no_quorum_ignore) {		action->needs = rsc_req_nothing;		value = "nothing (default)";			} else if(data_set->no_quorum_policy == no_quorum_freeze		  && data_set->stonith_enabled) {		action->needs = rsc_req_stonith;		value = "fencing (default)";	} else {		action->needs = rsc_req_quorum;		value = "quorum (default)";	}	crm_debug_2("\tAction %s requires: %s", action->task, value);	value = NULL;	if(xml_obj != NULL) {		value = crm_element_value(xml_obj, "on_fail");	}	if(value == NULL && safe_str_eq(action->task, CRMD_ACTION_STOP)) {		value = crm_element_value(action->rsc->xml, "on_stopfail");	}		if(value == NULL) {	} else if(safe_str_eq(value, "fence")) {		action->on_fail = action_fail_fence;		value = "node fencing";	} else if(safe_str_eq(value, "stop")) {		action->on_fail = action_fail_stop;		value = "resource stop";	} else if(safe_str_eq(value, "nothing")) {		action->on_fail = action_fail_nothing;	} else if(safe_str_eq(value, "block")) {		action->on_fail = action_fail_block;	} else if(safe_str_eq(value, "ignore")) {		action->on_fail = action_fail_nothing;		value = "nothing";	} else {		pe_err("Resource %s: Unknown failure type (%s)",		       action->rsc->id, value);		value = NULL;	}		/* defaults */	if(value == NULL && safe_str_eq(action->task, CRMD_ACTION_STOP)) {		if(data_set->stonith_enabled) {			action->on_fail = action_fail_fence;					value = "resource fence (default)";					} else {			action->on_fail = action_fail_block;					value = "resource block (default)";		}			} else if(value == NULL) {		action->on_fail = action_fail_stop;				value = "resource stop (default)";	}		crm_debug_2("\t%s failure results in: %s", action->task, value);	if(xml_obj == NULL) {		return;	}		for(;lpc < DIMOF(fields); lpc++) {		value = crm_element_value(xml_obj, fields[lpc]);		add_hash_param(action->extra, fields[lpc], value);	}/* 	if(safe_str_eq(native_data->agent->class, "stonith")) { *//* 		if(rsc->start_needs == rsc_req_stonith) { *//* 			pe_err("Stonith resources (eg. %s) cannot require" *//* 			       " fencing to start", rsc->id); *//* 		} *//* 		rsc->start_needs = rsc_req_quorum; *//* 	} */}