continue; } else if(chosen != NULL) {  crm_info("Move resource %s (%s -> %s)", rsc->id, safe_val3(NULL, node, details, uname), safe_val3(NULL, chosen, details, uname)); action_new(rsc, stop_rsc, NULL, node); action_new(rsc, start_rsc, NULL, chosen);  } else { crm_info("Stop resource %s (%s)", rsc->id, safe_val3(NULL, node, details, uname)); action_new(rsc, stop_rsc, NULL, node); }  );
} else { crm_info("Stop resource %s (%s)", rsc->id, safe_val3(NULL, node, details, uname)); action_new(rsc, stop_rsc, NULL, node); }
void native_create_actions(resource_t *rsc, GListPtr *ordering_constraints){	gboolean can_start = FALSE;	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) {		can_start = TRUE;	}		if(can_start && g_list_length(native_data->running_on) == 0) {		/* create start action */		action_t *op = action_new(rsc, start_rsc, NULL, chosen);		if(have_quorum == FALSE && require_quorum == TRUE) {			op->runnable = FALSE;		} else {			crm_info("Start resource %s (%s)",				 rsc->id, safe_val3(					 NULL, chosen, details, uname));			create_monitor_actions(				rsc, op, chosen, ordering_constraints);		}			} else if(g_list_length(native_data->running_on) > 1) {		crm_info("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 (%s)",					 rsc->id,					 safe_val3(NULL, node, details, uname));				action_new(rsc, stop_rsc, NULL, node);				);		}				if(rsc->recovery_type == recovery_stop_start && can_start) {			crm_info("Start resource %s (%s)",				 rsc->id,				 safe_val3(NULL, chosen, details, uname));			action_new(rsc, start_rsc, NULL, chosen);		}			} else {		crm_debug("Stop and possible restart of %s", rsc->id);				slist_iter(			node, node_t, native_data->running_on, lpc,										if(chosen != NULL && safe_str_eq(				   node->details->id,				   chosen->details->id)) {				/* restart */				crm_info("Leave resource %s alone (%s)", rsc->id,					 safe_val3(NULL, chosen, details, uname));								/* in case the actions already exist */				slist_iter(					action, action_t, rsc->actions, lpc2,										if(action->task == start_rsc					   || action->task == stop_rsc){						action->optional = TRUE;					}					);								continue;			} else if(chosen != NULL) {				/* move */				crm_info("Move resource %s (%s -> %s)", rsc->id,					 safe_val3(NULL, node, details, uname),					 safe_val3(NULL, chosen, details, uname));				action_new(rsc, stop_rsc, NULL, node);				action_new(rsc, start_rsc, NULL, chosen);			} else {				crm_info("Stop resource %s (%s)", rsc->id,					 safe_val3(NULL, node, details, uname));				action_new(rsc, stop_rsc, NULL, node);			}						);		}