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

Function anonymous_known_on

pengine/master.c:397–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

395}
396
397static gboolean
398anonymous_known_on(resource_t * rsc, node_t *node)
399{
400 GListPtr rIter = NULL;
401 char *key = clone_strip(rsc->id);
402 resource_t *parent = uber_parent(rsc);
403
404 for(rIter = parent->children; rIter; rIter = rIter->next) {
405 resource_t *child = rIter->data;
406
407 /* ->find_rsc() because we might be a cloned group
408 * and knowing that other members of the group are
409 * known here implies nothing
410 */
411 rsc = parent->fns->find_rsc(child, key, NULL, pe_find_clone);
412 pe_rsc_trace(rsc, "Checking %s for %s on %s", rsc->id, key, node->details->uname);
413 if(g_hash_table_lookup(rsc->known_on, node->details->id)) {
414 free(key);
415 return TRUE;
416 }
417 }
418 free(key);
419 return FALSE;
420}
421
422static int
423master_score(resource_t * rsc, node_t * node, int not_set_value)

Callers 1

master_scoreFunction · 0.85

Calls 2

clone_stripFunction · 0.85
uber_parentFunction · 0.85

Tested by

no test coverage detected