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

Function find_clone_activity_on

pengine/native.c:2598–2630  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2596};
2597
2598static enum stack_activity
2599find_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
2632static enum stack_activity
2633check_stack_element(resource_t * rsc, resource_t * other_rsc, const char *type)

Callers 1

check_stack_elementFunction · 0.85

Calls 2

find_first_actionFunction · 0.85
is_setFunction · 0.85

Tested by

no test coverage detected