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

Function update_failcounts

tools/crm_simulate.c:311–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309}
310
311static void
312update_failcounts(xmlNode * cib_node, const char *resource, int interval, int rc)
313{
314 if (rc == 0) {
315 return;
316
317 } else if (rc == 7 && interval == 0) {
318 return;
319
320 } else {
321 char *name = NULL;
322 char *now = crm_itoa(time(NULL));
323
324 name = crm_concat("fail-count", resource, '-');
325 inject_transient_attr(cib_node, name, "value++");
326
327 name = crm_concat("last-failure", resource, '-');
328 inject_transient_attr(cib_node, name, now);
329
330 free(name);
331 free(now);
332 }
333}
334
335static gboolean
336exec_pseudo_action(crm_graph_t * graph, crm_action_t * action)

Callers 2

exec_rsc_actionFunction · 0.85
modify_configurationFunction · 0.85

Calls 3

crm_itoaFunction · 0.85
crm_concatFunction · 0.85
inject_transient_attrFunction · 0.85

Tested by

no test coverage detected