if(op != NULL && op->runnable) { create_monitor_actions( rsc, op, chosen, ordering_constraints);
if(rsc->schedule_recurring == TRUE && (start == NULL || start->runnable)) { create_recurring_actions( rsc, start, chosen, ordering_constraints);
void native_create_actions(resource_t *rsc, GListPtr *ordering_constraints){	action_t *op = 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 */		op = action_new(rsc, start_rsc, NULL, chosen);		if( !have_quorum && no_quorum_policy != no_quorum_ignore) {			op->runnable = FALSE;					} else {			crm_info("Start resource %s (%s)",				 rsc->id, safe_val3(					 NULL, chosen, details, uname));		}			} 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) (recovery)",					 rsc->id,					 safe_val3(NULL, node, details, uname));				action_new(rsc, stop_rsc, NULL, 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) (recovery)",				 rsc->id,				 safe_val3(NULL, chosen, details, uname));			op = action_new(rsc, start_rsc, NULL, chosen);		}		if(rsc->recovery_type == recovery_block) {			crm_warn("RESOURCE %s WILL REMAIN ACTIVE ON MULTIPLE"				 " NODES PENDING MANUAL INTERVENTION", rsc->id);						slist_iter(				node, node_t,				native_data->running_on, lpc,				crm_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 != NULL?" and restart":"",rsc->id);		CRM_DEV_ASSERT(node != NULL);				if(chosen != NULL && safe_str_eq(			   node->details->id, chosen->details->id)) {			/* restart */			crm_info("Leave resource %s on (%s)",rsc->id,				 safe_val3(NULL,chosen,details,uname));			if(rsc->start_pending) {				op = action_new(rsc, start_rsc, NULL, chosen);			}						/* in case the actions already exist */			slist_iter(				action, action_t, rsc->actions, lpc2,								if(action->task == start_rsc				   && rsc->start_pending == FALSE) {					action->optional = TRUE;				} else if(action->task == stop_rsc){					action->optional = TRUE; 				}				);					} 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);			op = 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);		}	}	if(op != NULL && op->runnable) {		create_monitor_actions(			rsc, op, chosen, ordering_constraints);	}}