MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / update_action

Function update_action

pengine/graph.c:341–471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339}
340
341gboolean
342update_action(action_t * then)
343{
344 GListPtr lpc = NULL;
345 enum pe_graph_flags changed = pe_graph_none;
346 int last_flags = then->flags;
347
348 crm_trace("Processing %s (%s %s %s)",
349 then->uuid,
350 is_set(then->flags, pe_action_optional) ? "optional" : "required",
351 is_set(then->flags, pe_action_runnable) ? "runnable" : "unrunnable",
352 is_set(then->flags,
353 pe_action_pseudo) ? "pseudo" : then->node ? then->node->details->uname : "");
354
355
356 if (is_set(then->flags, pe_action_requires_any)) {
357 clear_bit(then->flags, pe_action_runnable);
358 }
359
360 for (lpc = then->actions_before; lpc != NULL; lpc = lpc->next) {
361 action_wrapper_t *other = (action_wrapper_t *) lpc->data;
362 action_t *first = other->action;
363
364 node_t *then_node = then->node;
365 node_t *first_node = first->node;
366
367 enum pe_action_flags then_flags = 0;
368 enum pe_action_flags first_flags = 0;
369
370 if (first->rsc && first->rsc->variant == pe_group && safe_str_eq(first->task, RSC_START)) {
371 first_node = first->rsc->fns->location(first->rsc, NULL, FALSE);
372 if (first_node) {
373 crm_trace("First: Found node %s for %s", first_node->details->uname, first->uuid);
374 }
375 }
376
377 if (then->rsc && then->rsc->variant == pe_group && safe_str_eq(then->task, RSC_START)) {
378 then_node = then->rsc->fns->location(then->rsc, NULL, FALSE);
379 if (then_node) {
380 crm_trace("Then: Found node %s for %s", then_node->details->uname, then->uuid);
381 }
382 }
383
384 clear_bit(changed, pe_graph_updated_first);
385
386 if (first->rsc != then->rsc
387 && first->rsc != NULL && then->rsc != NULL && first->rsc != then->rsc->parent) {
388 first = rsc_expand_action(first);
389 }
390 if (first != other->action) {
391 crm_trace("Ordering %s afer %s instead of %s", then->uuid, first->uuid,
392 other->action->uuid);
393 }
394
395 first_flags = get_action_flags(first, then_node);
396 then_flags = get_action_flags(then, first_node);
397
398 crm_trace("Checking %s (%s %s %s) against %s (%s %s %s) 0x%.6x",

Callers 1

stage7Function · 0.85

Calls 5

is_setFunction · 0.85
rsc_expand_actionFunction · 0.85
get_action_flagsFunction · 0.85
graph_update_actionFunction · 0.85
order_actionsFunction · 0.85

Tested by

no test coverage detected