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

Function find_actions_by_task

pengine/allocate.c:1376–1406  ·  view source on GitHub ↗

* Determin the sets of independant actions and the correct order for the * actions in each set. * * Mark dependencies of un-runnable actions un-runnable * */

Source from the content-addressed store, hash-verified

1374 *
1375 */
1376static GListPtr
1377find_actions_by_task(GListPtr actions, resource_t * rsc, const char *original_key)
1378{
1379 GListPtr list = NULL;
1380
1381 list = find_actions(actions, original_key, NULL);
1382 if (list == NULL) {
1383 /* we're potentially searching a child of the original resource */
1384 char *key = NULL;
1385 char *tmp = NULL;
1386 char *task = NULL;
1387 int interval = 0;
1388
1389 if (parse_op_key(original_key, &tmp, &task, &interval)) {
1390 key = generate_op_key(rsc->id, task, interval);
1391 /* crm_err("looking up %s instead of %s", key, original_key); */
1392 /* slist_iter(action, action_t, actions, lpc, */
1393 /* crm_err(" - %s", action->uuid)); */
1394 list = find_actions(actions, key, NULL);
1395
1396 } else {
1397 crm_err("search key: %s", original_key);
1398 }
1399
1400 free(key);
1401 free(tmp);
1402 free(task);
1403 }
1404
1405 return list;
1406}
1407
1408static void
1409rsc_order_then(action_t * lh_action, resource_t * rsc, order_constraint_t * order)

Callers 2

rsc_order_thenFunction · 0.85
rsc_order_firstFunction · 0.85

Calls 3

find_actionsFunction · 0.85
parse_op_keyFunction · 0.85
generate_op_keyFunction · 0.85

Tested by

no test coverage detected