MCPcopy Create free account
hub / github.com/corosync/corosync / wd_resource_failed

Function wd_resource_failed

exec/wd.c:335–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333}
334
335static void wd_resource_failed (struct cs_fsm* fsm, int32_t event, void * data)
336{
337 struct resource* ref = (struct resource*)data;
338
339 if (ref->check_timer) {
340 api->timer_delete(ref->check_timer);
341 ref->check_timer = 0;
342 }
343
344 log_printf (LOGSYS_LEVEL_CRIT, "%s resource \"%s\" failed!",
345 ref->recovery, (char*)ref->name);
346 if (strcmp (ref->recovery, "watchdog") == 0 ||
347 strcmp (ref->recovery, "quit") == 0) {
348 watchdog_ok = 0;
349 }
350 else if (strcmp (ref->recovery, "reboot") == 0) {
351 reboot(RB_AUTOBOOT);
352 }
353 else if (strcmp (ref->recovery, "shutdown") == 0) {
354 reboot(RB_POWER_OFF);
355 }
356 cs_fsm_state_set(fsm, WD_S_FAILED, data, wd_fsm_cb);
357}
358
359static void wd_key_changed(
360 int32_t event,

Callers

nothing calls this directly

Calls 1

cs_fsm_state_setFunction · 0.85

Tested by

no test coverage detected