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

Function group_resource_state

lib/pengine/group.c:232–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232enum rsc_role_e
233group_resource_state(const resource_t * rsc, gboolean current)
234{
235 enum rsc_role_e group_role = RSC_ROLE_UNKNOWN;
236 GListPtr gIter = rsc->children;
237
238 for (; gIter != NULL; gIter = gIter->next) {
239 resource_t *child_rsc = (resource_t *) gIter->data;
240 enum rsc_role_e role = child_rsc->fns->state(child_rsc, current);
241
242 if (role > group_role) {
243 group_role = role;
244 }
245 }
246
247 pe_rsc_trace(rsc, "%s role: %s", rsc->id, role2text(group_role));
248 return group_role;
249}

Callers

nothing calls this directly

Calls 1

role2textFunction · 0.85

Tested by

no test coverage detected