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

Function order_actions

lib/pengine/utils.c:1425–1472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1423}
1424
1425gboolean
1426order_actions(action_t * lh_action, action_t * rh_action, enum pe_ordering order)
1427{
1428 GListPtr gIter = NULL;
1429 action_wrapper_t *wrapper = NULL;
1430 GListPtr list = NULL;
1431
1432 if (order == pe_order_none) {
1433 return FALSE;
1434 }
1435
1436 if (lh_action == NULL || rh_action == NULL) {
1437 return FALSE;
1438 }
1439
1440 crm_trace("Ordering Action %s before %s", lh_action->uuid, rh_action->uuid);
1441
1442 /* Filter dups, otherwise update_action_states() has too much work to do */
1443 gIter = lh_action->actions_after;
1444 for (; gIter != NULL; gIter = gIter->next) {
1445 action_wrapper_t *after = (action_wrapper_t *) gIter->data;
1446
1447 if (after->action == rh_action && (after->type & order)) {
1448 return FALSE;
1449 }
1450 }
1451
1452 wrapper = calloc(1, sizeof(action_wrapper_t));
1453 wrapper->action = rh_action;
1454 wrapper->type = order;
1455
1456 list = lh_action->actions_after;
1457 list = g_list_prepend(list, wrapper);
1458 lh_action->actions_after = list;
1459
1460 wrapper = NULL;
1461
1462/* order |= pe_order_implies_then; */
1463/* order ^= pe_order_implies_then; */
1464
1465 wrapper = calloc(1, sizeof(action_wrapper_t));
1466 wrapper->action = lh_action;
1467 wrapper->type = order;
1468 list = rh_action->actions_before;
1469 list = g_list_prepend(list, wrapper);
1470 rh_action->actions_before = list;
1471 return TRUE;
1472}
1473
1474action_t *
1475get_pseudo_op(const char *name, pe_working_set_t * data_set)

Callers 15

process_orphan_resourceFunction · 0.85
probe_resourcesFunction · 0.85
stage6Function · 0.85
rsc_order_thenFunction · 0.85
rsc_order_firstFunction · 0.85
stage7Function · 0.85
pe_notifyFunction · 0.85
pe_post_notifyFunction · 0.85
clone_create_actionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected