* Determin the sets of independant actions and the correct order for the * actions in each set. * * Mark dependencies of un-runnable actions un-runnable * */
| 1374 | * |
| 1375 | */ |
| 1376 | static GListPtr |
| 1377 | find_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 | |
| 1408 | static void |
| 1409 | rsc_order_then(action_t * lh_action, resource_t * rsc, order_constraint_t * order) |
no test coverage detected