crm_debug("Stop%s of %s", chosen?" and restart":"", rsc->id);
crm_debug_2("Stop%s of %s", chosen?" and restart":"", rsc->id);
void native_create_actions(resource_t *rsc, GListPtr *ordering_constraints){	action_t *start = NULL;	action_t *stop = NULL;	node_t *chosen = NULL;	native_variant_data_t *native_data = NULL;	get_native_variant_data(native_data, rsc);	if(native_data->color != NULL) {		chosen = native_data->color->details->chosen_node;	}		if(chosen != NULL && g_list_length(native_data->running_on) == 0) {		/* create start action */		start = start_action(rsc, chosen);		if( !have_quorum && no_quorum_policy != no_quorum_ignore) {			start->runnable = FALSE;					} else {			crm_info("Start resource %s (%s)",				 rsc->id, chosen->details->uname);			rsc->schedule_recurring = TRUE;		}			} else if(g_list_length(native_data->running_on) > 1) {		pe_err("Attempting recovery of resource %s", rsc->id);				if(rsc->recovery_type == recovery_stop_start		   || rsc->recovery_type == recovery_stop_only) {			slist_iter(				node, node_t,				native_data->running_on, lpc,								crm_info("Stop  resource %s\t(%s) (recovery)",					 rsc->id, node->details->uname);				stop = stop_action(rsc, node);				);		}				if(rsc->recovery_type == recovery_stop_start && chosen) {			/* if one of the "stops" is for a node outside			 * our partition, then this will block anyway			 */			crm_info("Start resource %s (%s)\t(recovery)",				 rsc->id, chosen->details->uname);			start = start_action(rsc, chosen);			rsc->schedule_recurring = TRUE;		}		if(rsc->recovery_type == recovery_block) {			pe_warn("RESOURCE %s WILL REMAIN ACTIVE ON MULTIPLE"				 " NODES PENDING MANUAL INTERVENTION", rsc->id);						slist_iter(				node, node_t, native_data->running_on, lpc,				pe_warn("Resource %s active on %s",					 rsc->id, node->details->uname);				);		}			} else if(g_list_length(native_data->running_on) == 1) {		node_t *node = native_data->running_on->data;				crm_debug("Stop%s of %s", chosen?" and restart":"", rsc->id);		CRM_DEV_ASSERT(node != NULL);				if(have_quorum == FALSE && no_quorum_policy == no_quorum_stop){			start = start_action(rsc, chosen);			stop = stop_action(rsc, node);			start->runnable = FALSE;		} else if(chosen != NULL && safe_str_eq(			   node->details->id, chosen->details->id)) {			/* restart */			if(rsc->recover) {				crm_info("Restart resource %s\t(%s)",					 rsc->id, chosen->details->uname);				start = start_action(rsc, chosen);				stop = stop_action(rsc, node);				rsc->schedule_recurring = TRUE;							} else {				crm_info("Leave resource %s\t(%s)",					 rsc->id, chosen->details->uname);				start = start_action(rsc, chosen);				if(rsc->start_pending == FALSE) {					start->optional = TRUE;				} else {					rsc->schedule_recurring = TRUE;				}					stop = stop_action(rsc, node);				stop->optional = TRUE;			}					} else if(chosen != NULL) {			/* move */			crm_info("Move  resource %s\t(%s -> %s)", rsc->id,				 node->details->uname,				 chosen->details->uname);			stop = stop_action(rsc, node);			start = start_action(rsc, chosen);			rsc->schedule_recurring = TRUE;					} else {			crm_info("Stop  resource %s\t(%s)",				 rsc->id, node->details->uname);			stop_action(rsc, node);		}	}		if(start != NULL && start->runnable) {		create_recurring_actions(			rsc, start, chosen, ordering_constraints);	}}