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

Function group_rsc_location

pengine/group.c:445–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443}
444
445void
446group_rsc_location(resource_t * rsc, rsc_to_node_t * constraint)
447{
448 GListPtr gIter = rsc->children;
449 GListPtr saved = constraint->node_list_rh;
450 GListPtr zero = node_list_dup(constraint->node_list_rh, TRUE, FALSE);
451 gboolean reset_scores = TRUE;
452 group_variant_data_t *group_data = NULL;
453
454 get_group_variant_data(group_data, rsc);
455
456 pe_rsc_debug(rsc, "Processing rsc_location %s for %s", constraint->id, rsc->id);
457
458 native_rsc_location(rsc, constraint);
459
460 for (; gIter != NULL; gIter = gIter->next) {
461 resource_t *child_rsc = (resource_t *) gIter->data;
462
463 child_rsc->cmds->rsc_location(child_rsc, constraint);
464 if (group_data->colocated && reset_scores) {
465 reset_scores = FALSE;
466 constraint->node_list_rh = zero;
467 }
468 }
469
470 constraint->node_list_rh = saved;
471 g_list_free_full(zero, free);
472}
473
474void
475group_expand(resource_t * rsc, pe_working_set_t * data_set)

Callers

nothing calls this directly

Calls 3

node_list_dupFunction · 0.85
native_rsc_locationFunction · 0.85
g_list_free_fullFunction · 0.85

Tested by

no test coverage detected