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

Function group_merge_weights

pengine/group.c:491–521  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

489}
490
491GHashTable *
492group_merge_weights(resource_t * rsc, const char *rhs, GHashTable * nodes, const char *attr,
493 float factor, enum pe_weights flags)
494{
495 GListPtr gIter = rsc->rsc_cons_lhs;
496 group_variant_data_t *group_data = NULL;
497
498 get_group_variant_data(group_data, rsc);
499
500 if (is_set(rsc->flags, pe_rsc_merging)) {
501 pe_rsc_info(rsc, "Breaking dependency loop with %s at %s", rsc->id, rhs);
502 return nodes;
503 }
504
505 set_bit(rsc->flags, pe_rsc_merging);
506
507 nodes =
508 group_data->first_child->cmds->merge_weights(group_data->first_child, rhs, nodes, attr,
509 factor, flags);
510
511 for (; gIter != NULL; gIter = gIter->next) {
512 rsc_colocation_t *constraint = (rsc_colocation_t *) gIter->data;
513
514 nodes = native_merge_weights(constraint->rsc_lh, rsc->id, nodes,
515 constraint->node_attribute,
516 (float) constraint->score / INFINITY, flags);
517 }
518
519 clear_bit(rsc->flags, pe_rsc_merging);
520 return nodes;
521}
522
523void
524group_append_meta(resource_t * rsc, xmlNode * xml)

Callers

nothing calls this directly

Calls 2

is_setFunction · 0.85
native_merge_weightsFunction · 0.85

Tested by

no test coverage detected