| 2596 | }; |
| 2597 | |
| 2598 | static enum stack_activity |
| 2599 | find_clone_activity_on(resource_t * rsc, resource_t * target, node_t * node, const char *type) |
| 2600 | { |
| 2601 | int mode = stack_stable; |
| 2602 | action_t *active = NULL; |
| 2603 | |
| 2604 | if (target->children) { |
| 2605 | GListPtr gIter = NULL; |
| 2606 | |
| 2607 | for (gIter = target->children; gIter != NULL; gIter = gIter->next) { |
| 2608 | resource_t *child = (resource_t *) gIter->data; |
| 2609 | |
| 2610 | mode |= find_clone_activity_on(rsc, child, node, type); |
| 2611 | } |
| 2612 | return mode; |
| 2613 | } |
| 2614 | |
| 2615 | active = find_first_action(target->actions, NULL, RSC_START, NULL); |
| 2616 | if (active && is_set(active->flags, pe_action_optional) == FALSE |
| 2617 | && is_set(active->flags, pe_action_pseudo) == FALSE) { |
| 2618 | pe_rsc_debug(rsc, "%s: found scheduled %s action (%s)", rsc->id, active->uuid, type); |
| 2619 | mode |= stack_starting; |
| 2620 | } |
| 2621 | |
| 2622 | active = find_first_action(target->actions, NULL, RSC_STOP, node); |
| 2623 | if (active && is_set(active->flags, pe_action_optional) == FALSE |
| 2624 | && is_set(active->flags, pe_action_pseudo) == FALSE) { |
| 2625 | pe_rsc_debug(rsc, "%s: found scheduled %s action (%s)", rsc->id, active->uuid, type); |
| 2626 | mode |= stack_stopping; |
| 2627 | } |
| 2628 | |
| 2629 | return mode; |
| 2630 | } |
| 2631 | |
| 2632 | static enum stack_activity |
| 2633 | check_stack_element(resource_t * rsc, resource_t * other_rsc, const char *type) |
no test coverage detected