33 && (probe->
node != NULL) && (then->
node != NULL)
35 const char *op = g_hash_table_lookup(then->
meta,
"stonith_action");
44 && (probe->
node != NULL) && (then->
node != NULL)
75 GList *then_actions = NULL;
106 if ((order->
rh_rsc != NULL)
132 order_type = order->
type;
137 if (probes == NULL) {
143 then_actions = g_list_prepend(NULL, order->
rh_action);
145 }
else if (order->
rh_rsc != NULL) {
148 if (then_actions == NULL) {
154 crm_trace(
"Implying 'probe then' orderings for '%s then %s' " 155 "(id=%d, type=%.6x)",
160 for (GList *probe_iter = probes; probe_iter != NULL;
161 probe_iter = probe_iter->next) {
165 for (GList *then_iter = then_actions; then_iter != NULL;
166 then_iter = then_iter->next) {
170 if (probe_needed_before_action(probe, then)) {
176 g_list_free(then_actions);
199 bool interleave =
false;
203 if ((after == NULL) || (probe == NULL) || (probe->
rsc == NULL)
215 crm_trace(
"Adding probe restart orderings for '%s@%s then %s@%s'",
225 && (probe->
rsc != after->
rsc)) {
227 GList *then_actions = NULL;
238 for (iter = then_actions; iter != NULL; iter = iter->next) {
246 g_list_free(then_actions);
252 if ((after->
rsc != NULL)
254 const char *interleave_s = g_hash_table_lookup(after->
rsc->
meta,
270 for (iter = after->
actions_after; iter != NULL; iter = iter->next) {
289 if ((after->
rsc == NULL)
302 && ((compatible_rsc == NULL)
303 || (compatible_rsc != after_wrapper->
action->
rsc))) {
308 crm_trace(
"Recursively adding probe restart orderings for " 309 "'%s@%s then %s@%s' (type=%#.6x)",
314 after_wrapper->
type);
316 add_restart_orderings_for_probe(probe, after_wrapper->
action,
data_set);
348 GList *probes = NULL;
352 g_list_foreach(rsc->
children, (GFunc) add_restart_orderings_for_rsc,
361 for (GList *iter = probes; iter != NULL; iter = iter->next) {
364 for (GList *then_iter = probe->
actions_after; then_iter != NULL;
365 then_iter = then_iter->next) {
370 clear_actions_tracking_flag(
data_set);
422 GList *actions = NULL;
423 GList *probes = NULL;
428 start = actions->data;
429 g_list_free(actions);
433 crm_err(
"No start action for %s", rsc->
id);
439 for (actions = start->actions_before; actions != NULL;
440 actions = actions->next) {
447 if (first->required_runnable_before) {
448 for (GList *clone_actions = first->actions_before;
449 clone_actions != NULL;
450 clone_actions = clone_actions->next) {
455 first->uuid, before->
action->
uuid, start->uuid);
463 crm_trace(
"Not a start op %s for %s", first->uuid, start->uuid);
466 if (first_rsc == NULL) {
470 crm_trace(
"Same parent %s for %s", first_rsc->id, start->uuid);
473 }
else if (!pe_rsc_is_clone(
uber_parent(first_rsc))) {
474 crm_trace(
"Not a clone %s for %s", first_rsc->id, start->uuid);
478 crm_err(
"Applying %s before %s %d", first->uuid, start->uuid,
481 for (GList *probe_iter = probes; probe_iter != NULL;
482 probe_iter = probe_iter->next) {
486 crm_err(
"Ordering %s before %s", first->uuid, probe->
uuid);
500 add_probe_orderings_for_stops(
data_set);
517 for (GList *iter =
data_set->
nodes; iter != NULL; iter = iter->next) {
519 const char *probed = NULL;
524 "the connection is unrecoverable", FALSE);
542 if (probed != NULL &&
crm_is_true(probed) == FALSE) {
557 rsc_iter = rsc_iter->next) {
#define pe__set_action_flags(action, flags_to_set)
pe_resource_t * container
resource_alloc_functions_t * cmds
GList * find_actions(GList *input, const char *key, const pe_node_t *on_node)
G_GNUC_INTERNAL bool pcmk__is_failed_remote_node(pe_node_t *node)
void pcmk__schedule_probes(pe_working_set_t *data_set)
bool pcmk__ends_with(const char *s, const char *match)
gboolean(* create_probe)(pe_resource_t *, pe_node_t *, pe_action_t *, gboolean, pe_working_set_t *)
pe_resource_t * uber_parent(pe_resource_t *rsc)
#define pe__clear_action_flags(action, flags_to_clear)
#define crm_trace(fmt, args...)
void pe_fence_node(pe_working_set_t *data_set, pe_node_t *node, const char *reason, bool priority_delay)
Schedule a fence action for a node.
char * crm_strdup_printf(char const *format,...) G_GNUC_PRINTF(1
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
struct pe_node_shared_s * details
gboolean order_actions(pe_action_t *lh_action, pe_action_t *rh_action, enum pe_ordering order)
pe_working_set_t * data_set
#define XML_ATTR_TE_NOWAIT
const char * pe_node_attribute_raw(pe_node_t *node, const char *name)
enum pe_obj_types variant
pe_resource_t * find_compatible_child(pe_resource_t *local_child, pe_resource_t *rsc, enum rsc_role_e filter, gboolean current, pe_working_set_t *data_set)
gboolean rsc_discovery_enabled
void pcmk__order_probes(pe_working_set_t *data_set)
Cluster status and scheduling.
GList * ordering_constraints
void add_hash_param(GHashTable *hash, const char *name, const char *value)
#define crm_err(fmt, args...)
enum pe_action_flags flags
gboolean crm_is_true(const char *s)
#define pe__set_order_flags(order_flags, flags_to_set)
#define XML_RSC_ATTR_INTERLEAVE
GList * pe__resource_actions(const pe_resource_t *rsc, const pe_node_t *node, const char *task, bool require_node)
Find all actions of given type for a resource.
pe_action_t * custom_action(pe_resource_t *rsc, char *key, const char *task, pe_node_t *on_node, gboolean optional, gboolean foo, pe_working_set_t *data_set)
Create or update an action object.