corosync
2.4.2
|
#include <config.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/types.h>
#include <linux/watchdog.h>
#include <sys/reboot.h>
#include <corosync/corotypes.h>
#include <corosync/corodefs.h>
#include <corosync/coroapi.h>
#include <corosync/list.h>
#include <corosync/logsys.h>
#include <corosync/icmap.h>
#include "fsm.h"
#include "service.h"
Go to the source code of this file.
Data Structures | |
struct | resource |
Macros | |
#define | WD_DEFAULT_TIMEOUT_SEC 6 |
#define | WD_DEFAULT_TIMEOUT_MS (WD_DEFAULT_TIMEOUT_SEC * CS_TIME_MS_IN_SEC) |
#define | WD_MIN_TIMEOUT_MS 500 |
#define | WD_MAX_TIMEOUT_MS (120 * CS_TIME_MS_IN_SEC) |
Enumerations | |
enum | wd_resource_state_t { WD_RESOURCE_GOOD, WD_RESOURCE_FAILED, WD_RESOURCE_STATE_UNKNOWN, WD_RESOURCE_NOT_MONITORED } |
enum | wd_resource_state { WD_S_RUNNING, WD_S_FAILED, WD_S_STOPPED } |
enum | wd_resource_event { WD_E_FAILURE, WD_E_CONFIG_CHANGED } |
Functions | |
LOGSYS_DECLARE_SUBSYS ("WD") | |
struct corosync_service_engine * | wd_get_service_engine_ver0 (void) |
Variables | |
struct corosync_service_engine | wd_service_engine |
const char * | wd_running_str = "running" |
const char * | wd_failed_str = "failed" |
const char * | wd_failure_str = "failure" |
const char * | wd_stopped_str = "stopped" |
const char * | wd_config_changed_str = "config_changed" |
struct cs_fsm_entry | wd_fsm_table [] |
#define WD_DEFAULT_TIMEOUT_MS (WD_DEFAULT_TIMEOUT_SEC * CS_TIME_MS_IN_SEC) |
Definition at line 84 of file wd.c.
Referenced by wd_get_service_engine_ver0().
#define WD_DEFAULT_TIMEOUT_SEC 6 |
Definition at line 83 of file wd.c.
Referenced by wd_get_service_engine_ver0().
#define WD_MAX_TIMEOUT_MS (120 * CS_TIME_MS_IN_SEC) |
Definition at line 86 of file wd.c.
Referenced by wd_get_service_engine_ver0().
#define WD_MIN_TIMEOUT_MS 500 |
Definition at line 85 of file wd.c.
Referenced by wd_get_service_engine_ver0().
enum wd_resource_event |
enum wd_resource_state |
enum wd_resource_state_t |
LOGSYS_DECLARE_SUBSYS | ( | "WD" | ) |
struct corosync_service_engine* wd_get_service_engine_ver0 | ( | void | ) |
Definition at line 146 of file wd.c.
References resource::check_timeout, resource::check_timer, COROSYNC_DONE_FATAL_ERR, corosync_exit_error, CS_FALSE, CS_FSM_CB_EVENT_PROCESS_NF, CS_FSM_CB_EVENT_STATE_SET, CS_FSM_CB_EVENT_STATE_SET_NF, CS_MAX, CS_OK, CS_TIME_MS_IN_SEC, CS_TRUE, cs_fsm::curr_entry, cs_fsm_entry::curr_state, cs_fsm::curr_state, ENTER, cs_fsm::entries, cs_fsm::event_to_str, resource::fsm, icmap_get_string(), icmap_get_uint32(), icmap_get_uint64(), icmap_iter_finalize(), icmap_iter_init(), icmap_iter_next(), ICMAP_KEYNAME_MAXLEN, icmap_set_uint32(), icmap_set_uint64(), resource::icmap_track, ICMAP_TRACK_ADD, icmap_track_add(), ICMAP_TRACK_DELETE, icmap_track_delete(), ICMAP_TRACK_MODIFY, ICMAP_TRACK_PREFIX, resource::last_updated, log_printf, LOGSYS_LEVEL_ALERT, LOGSYS_LEVEL_CRIT, LOGSYS_LEVEL_DEBUG, LOGSYS_LEVEL_ERROR, LOGSYS_LEVEL_INFO, LOGSYS_LEVEL_WARNING, MILLI_2_NANO_SECONDS, resource::name, cs_fsm::name, resource::recovery, resource::res_path, cs_fsm::state_to_str, cs_fsm::table, corosync_api_v1::timer_add_duration, corosync_api_v1::timer_delete, user_data, wd_config_changed_str, WD_DEFAULT_TIMEOUT_MS, WD_DEFAULT_TIMEOUT_SEC, WD_E_CONFIG_CHANGED, WD_E_FAILURE, wd_failed_str, wd_failure_str, wd_fsm_table, WD_MAX_TIMEOUT_MS, WD_MIN_TIMEOUT_MS, wd_running_str, WD_S_FAILED, WD_S_RUNNING, WD_S_STOPPED, and wd_stopped_str.
const char* wd_config_changed_str = "config_changed" |
Definition at line 135 of file wd.c.
Referenced by wd_get_service_engine_ver0().
const char* wd_failed_str = "failed" |
Definition at line 132 of file wd.c.
Referenced by wd_get_service_engine_ver0().
const char* wd_failure_str = "failure" |
Definition at line 133 of file wd.c.
Referenced by wd_get_service_engine_ver0().
struct cs_fsm_entry wd_fsm_table[] |
Definition at line 137 of file wd.c.
Referenced by wd_get_service_engine_ver0().
const char* wd_running_str = "running" |
Definition at line 131 of file wd.c.
Referenced by wd_get_service_engine_ver0().
struct corosync_service_engine wd_service_engine |
const char* wd_stopped_str = "stopped" |
Definition at line 134 of file wd.c.
Referenced by wd_get_service_engine_ver0().