76 #include <sys/types.h>
81 #include <sys/socket.h>
84 #include <sys/resource.h>
86 #include <netinet/in.h>
87 #include <arpa/inet.h>
96 #include <semaphore.h>
98 #include <qb/qbdefs.h>
100 #include <qb/qbloop.h>
101 #include <qb/qbutil.h>
102 #include <qb/qbipcs.h>
124 #ifdef HAVE_SMALL_MEMORY_FOOTPRINT
125 #define IPC_LOGSYS_SIZE 1024*64
127 #define IPC_LOGSYS_SIZE 8192*128
137 #define SERVER_BACKLOG 5
139 static int sched_priority = 0;
141 static unsigned int service_count = 32;
147 static int sync_in_process = 1;
149 static qb_loop_t *corosync_poll_handle;
155 static const char *corosync_lock_file =
LOCALSTATEDIR"/run/corosync.pid";
157 static int ip_version = AF_INET;
161 return (corosync_poll_handle);
169 int (*dispatch_fn) (
int fd,
173 return qb_loop_poll_add(handle, QB_LOOP_MED, fd, events, data,
179 return qb_loop_poll_del(handle, fd);
193 static void corosync_blackbox_write_to_file (
void)
195 char fname[PATH_MAX];
196 char fdata_fname[PATH_MAX];
197 char time_str[PATH_MAX];
198 struct tm cur_time_tm;
202 cur_time_t = time(NULL);
203 localtime_r(&cur_time_t, &cur_time_tm);
205 strftime(time_str, PATH_MAX,
"%Y-%m-%dT%H:%M:%S", &cur_time_tm);
206 snprintf(fname, PATH_MAX,
"%s/fdata-%s-%lld",
209 (
long long int)getpid());
211 if ((res = qb_log_blackbox_write_to_file(fname)) < 0) {
214 snprintf(fdata_fname,
sizeof(fdata_fname),
"%s/fdata",
get_run_dir());
216 if (symlink(fname, fdata_fname) == -1) {
222 static void unlink_all_completed (
void)
225 qb_loop_stop (corosync_poll_handle);
234 static int32_t sig_diag_handler (
int num,
void *data)
240 static int32_t sig_exit_handler (
int num,
void *data)
247 static void sigsegv_handler (
int num)
249 (void)signal (SIGSEGV, SIG_DFL);
250 corosync_blackbox_write_to_file ();
258 static int32_t sig_segv_handler (
int num,
void *data)
261 sigsegv_handler(num);
266 static void sigabrt_handler (
int num)
268 (void)signal (SIGABRT, SIG_DFL);
269 corosync_blackbox_write_to_file ();
277 static int32_t sig_abrt_handler (
int num,
void *data)
280 sigabrt_handler(num);
285 #define LOCALHOST_IP inet_addr("127.0.0.1")
287 static void *corosync_group_handle;
294 static void serialize_lock (
void)
298 static void serialize_unlock (
void)
302 static void corosync_sync_completed (
void)
305 "Completed service synchronization, ready to provide service.");
316 static int corosync_sync_callbacks_retrieve (
324 if (callbacks == NULL) {
339 static void member_object_joined (
unsigned int nodeid)
346 "runtime.totem.pg.mrp.srp.members.%u.ip", nodeid);
348 "runtime.totem.pg.mrp.srp.members.%u.join_count", nodeid);
350 "runtime.totem.pg.mrp.srp.members.%u.status", nodeid);
365 static void member_object_left (
unsigned int nodeid)
370 "runtime.totem.pg.mrp.srp.members.%u.status", nodeid);
377 static void confchg_fn (
379 const unsigned int *member_list,
size_t member_list_entries,
380 const unsigned int *left_list,
size_t left_list_entries,
381 const unsigned int *joined_list,
size_t joined_list_entries,
385 int abort_activate = 0;
387 if (sync_in_process == 1) {
392 memcpy (&corosync_ring_id, ring_id,
sizeof (
struct memb_ring_id));
394 for (i = 0; i < left_list_entries; i++) {
395 member_object_left (left_list[i]);
397 for (i = 0; i < joined_list_entries; i++) {
398 member_object_joined (joined_list[i]);
403 for (i = 0; i < service_count; i++) {
406 member_list, member_list_entries,
407 left_list, left_list_entries,
408 joined_list, joined_list_entries, ring_id);
412 if (abort_activate) {
419 sync_start (member_list, member_list_entries, ring_id);
423 static void priv_drop (
void)
428 static void corosync_tty_detach (
void)
456 devnull = open(
"/dev/null", O_RDWR);
461 if (dup2(devnull, 0) < 0 || dup2(devnull, 1) < 0
462 || dup2(devnull, 2) < 0) {
469 static void corosync_mlockall (
void)
472 struct rlimit rlimit;
474 rlimit.rlim_cur = RLIM_INFINITY;
475 rlimit.rlim_max = RLIM_INFINITY;
477 #ifndef RLIMIT_MEMLOCK
478 #define RLIMIT_MEMLOCK RLIMIT_VMEM
483 res = mlockall (MCL_CURRENT | MCL_FUTURE);
486 "Could not lock memory of service to avoid page faults");
491 static void corosync_totem_stats_updater (
void *data)
494 uint32_t total_mtt_rx_token;
495 uint32_t total_backlog_calc;
496 uint32_t total_token_holdtime;
532 icmap_set_uint8(
"runtime.totem.pg.mrp.srp.firewall_enabled_or_nic_failure",
538 "Totem is unable to form a cluster because of an "
539 "operating system or network fault. The most common "
540 "cause of this message is that the local firewall is "
541 "configured improperly.");
542 icmap_set_uint8(
"runtime.totem.pg.mrp.srp.firewall_enabled_or_nic_failure", 1);
544 icmap_set_uint8(
"runtime.totem.pg.mrp.srp.firewall_enabled_or_nic_failure", 0);
551 total_mtt_rx_token = 0;
552 total_token_holdtime = 0;
553 total_backlog_calc = 0;
574 icmap_set_uint32(
"runtime.totem.pg.mrp.srp.mtt_rx_token", (total_mtt_rx_token / token_count));
575 icmap_set_uint32(
"runtime.totem.pg.mrp.srp.avg_token_workload", (total_token_holdtime / token_count));
576 icmap_set_uint32(
"runtime.totem.pg.mrp.srp.avg_backlog_calc", (total_backlog_calc / token_count));
582 corosync_totem_stats_updater,
583 &corosync_stats_timer_handle);
586 static void totem_dynamic_notify(
588 const char *key_name,
594 unsigned int ring_no;
595 unsigned int member_no;
597 int add_new_member = 0;
598 int remove_old_member = 0;
601 res = sscanf(key_name,
"nodelist.node.%u.ring%u%s", &member_no, &ring_no, tmp_str);
605 if (strcmp(tmp_str,
"_addr") != 0) {
614 remove_old_member = 1;
620 remove_old_member = 1;
623 if (remove_old_member) {
625 "removing dynamic member %s for ring %u", (
char *)old_val.
data, ring_no);
631 if (add_new_member) {
633 "adding dynamic member %s for ring %u", (
char *)new_val.
data, ring_no);
640 static void corosync_totem_dynamic_init (
void)
646 totem_dynamic_notify,
651 static void corosync_totem_stats_init (
void)
659 corosync_totem_stats_updater,
660 &corosync_stats_timer_handle);
664 static void deliver_fn (
667 unsigned int msg_len,
668 int endian_conversion_required)
670 const struct qb_ipc_request_header *
header;
676 if (endian_conversion_required) {
699 if (endian_conversion_required) {
700 assert(
corosync_service[service]->exec_engine[fn_id].exec_endian_convert_fn != NULL);
710 const struct iovec *iovec,
711 unsigned int iov_len,
714 const struct qb_ipc_request_header *req = iovec->iov_base;
718 service = req->id >> 16;
719 fn_id = req->id & 0xffff;
728 static void corosync_ring_id_create_or_load (
734 char filename[PATH_MAX];
736 snprintf (filename,
sizeof(filename),
"%s/ringid_%s",
738 fd = open (filename, O_RDONLY, 0700);
743 res = read (fd, &memb_ring_id->
seq, sizeof (uint64_t));
749 if ((fd == -1) || (res !=
sizeof (uint64_t))) {
750 memb_ring_id->
seq = 0;
752 fd = open (filename, O_CREAT|O_RDWR, 0700);
754 res = write (fd, &memb_ring_id->
seq, sizeof (uint64_t));
758 "Couldn't write ringid file '%s'", filename);
764 "Couldn't create ringid file '%s'", filename);
771 assert (!totemip_zero_check(&memb_ring_id->
rep));
774 static void corosync_ring_id_store (
775 const struct memb_ring_id *memb_ring_id,
778 char filename[PATH_MAX];
782 snprintf (filename,
sizeof(filename),
"%s/ringid_%s",
785 fd = open (filename, O_WRONLY, 0777);
787 fd = open (filename, O_CREAT|O_RDWR, 0777);
791 "Couldn't store new ring id %llx to stable storage",
797 "Storing new sequence id for ring %llx", memb_ring_id->
seq);
798 res = write (fd, &memb_ring_id->
seq,
sizeof(memb_ring_id->
seq));
800 if (res !=
sizeof(memb_ring_id->
seq)) {
802 "Couldn't store new ring id %llx to stable storage",
809 static qb_loop_timer_handle recheck_the_q_level_timer;
825 unsigned int service,
828 void *sending_allowed_private_data)
832 struct iovec reserve_iovec;
833 struct qb_ipc_request_header *header = (
struct qb_ipc_request_header *)msg;
836 reserve_iovec.iov_base = (
char *)header;
837 reserve_iovec.iov_len = header->size;
840 corosync_group_handle,
846 sending_allowed = QB_FALSE;
852 sending_allowed = QB_TRUE;
854 sending_allowed = QB_TRUE;
861 return -EHOSTUNREACH;
864 return (sending_allowed);
882 assert (source != NULL);
893 assert ((source != NULL) && (conn != NULL));
906 static void timer_function_scheduler_timeout (
void *data)
909 unsigned long long tv_current;
910 unsigned long long tv_diff;
912 tv_current = qb_util_nano_current_get ();
914 if (timeout_data->
tv_prev == 0) {
918 timeout_data->
tv_prev = tv_current;
922 tv_diff = tv_current - timeout_data->
tv_prev;
923 timeout_data->
tv_prev = tv_current;
927 "(threshold is %0.4f ms). Consider token timeout increase.",
928 (
float)tv_diff / QB_TIME_NS_IN_MSEC, (
float)timeout_data->
max_tv_diff / QB_TIME_NS_IN_MSEC);
935 qb_loop_timer_add (corosync_poll_handle,
939 timer_function_scheduler_timeout,
944 static void corosync_setscheduler (
void)
946 #if defined(HAVE_PTHREAD_SETSCHEDPARAM) && defined(HAVE_SCHED_GET_PRIORITY_MAX) && defined(HAVE_SCHED_SETSCHEDULER)
949 sched_priority = sched_get_priority_max (SCHED_RR);
950 if (sched_priority != -1) {
955 "Could not set SCHED_RR at priority %d",
959 #ifdef HAVE_QB_LOG_THREAD_PRIORITY_SET
960 qb_log_thread_priority_set (SCHED_OTHER, 0);
967 #ifdef HAVE_QB_LOG_THREAD_PRIORITY_SET
968 res = qb_log_thread_priority_set (SCHED_RR, sched_priority);
974 "Could not set logsys thread priority."
975 " Can't continue because of priority inversions.");
981 "Could not get maximum scheduler priority");
986 "The Platform is missing process priority setting features. Leaving at default.");
991 _logsys_log_printf(
int level,
int subsys,
992 const char *function_name,
993 const char *file_name,
999 _logsys_log_printf(
int level,
int subsys,
1000 const
char *function_name,
1001 const
char *file_name,
1003 const
char *format, ...)
1007 va_start(ap, format);
1008 qb_log_from_external_source_va(function_name, file_name,
1009 format, level, file_line,
1014 static void fplay_key_change_notify_fn (
1016 const char *key_name,
1021 if (strcmp(key_name,
"runtime.blackbox.dump_flight_data") == 0) {
1022 fprintf(stderr,
"Writetofile\n");
1023 corosync_blackbox_write_to_file ();
1025 if (strcmp(key_name,
"runtime.blackbox.dump_state") == 0) {
1026 fprintf(stderr,
"statefump\n");
1031 static void corosync_fplay_control_init (
void)
1040 fplay_key_change_notify_fn,
1044 fplay_key_change_notify_fn,
1055 static void set_icmap_ro_keys_flag (
void)
1080 static void main_service_ready (
void)
1093 corosync_totem_stats_init ();
1094 corosync_fplay_control_init ();
1095 corosync_totem_dynamic_init ();
1097 corosync_sync_callbacks_retrieve,
1098 corosync_sync_completed);
1101 static enum e_corosync_done corosync_flock (
const char *lockfile, pid_t pid)
1111 lf = open (lockfile, O_WRONLY | O_CREAT, 0640);
1118 lock.l_type = F_WRLCK;
1120 lock.l_whence = SEEK_SET;
1122 if (fcntl (lf, F_SETLK, &
lock) == -1) {
1142 if (ftruncate (lf, 0) == -1) {
1146 goto error_close_unlink;
1149 memset (pid_s, 0,
sizeof (pid_s));
1150 snprintf (pid_s,
sizeof (pid_s) - 1,
"%u\n", pid);
1153 if (write (lf, pid_s, strlen (pid_s)) != strlen (pid_s)) {
1154 if (errno == EINTR) {
1158 "Error was %s", strerror (errno));
1160 goto error_close_unlink;
1164 if ((fd_flag = fcntl (lf, F_GETFD, 0)) == -1) {
1166 "Error was %s", strerror (errno));
1168 goto error_close_unlink;
1170 fd_flag |= FD_CLOEXEC;
1171 if (fcntl (lf, F_SETFD, fd_flag) == -1) {
1173 "Error was %s", strerror (errno));
1175 goto error_close_unlink;
1188 int main (
int argc,
char **argv,
char **envp)
1190 const char *error_string;
1193 int background, setprio, testonly;
1194 struct stat stat_out;
1196 uint64_t totem_config_warnings;
1205 while ((ch = getopt (argc, argv,
"fprtv")) != EOF) {
1220 printf (
"Corosync Cluster Engine, version '%s'\n",
VERSION);
1221 printf (
"Copyright (c) 2006-2009 Red Hat, Inc.\n");
1223 return EXIT_SUCCESS;
1229 " -f : Start application in foreground.\n"\
1230 " -p : Does nothing. \n"\
1231 " -t : Test configuration and exit.\n"\
1232 " -r : Set round robin realtime scheduling \n"\
1233 " -v : Display version and SVN revision of Corosync and exit.\n");
1235 return EXIT_FAILURE;
1245 corosync_setscheduler ();
1248 corosync_mlockall ();
1253 (void)signal (SIGSEGV, sigsegv_handler);
1254 (void)signal (SIGABRT, sigabrt_handler);
1255 #if MSG_NOSIGNAL != 0
1256 (void)signal (SIGPIPE, SIG_IGN);
1263 set_icmap_ro_keys_flag();
1286 fprintf(stderr,
"%s", error_string);
1300 if ((res == -1) || (res == 0 && !S_ISDIR(stat_out.st_mode))) {
1308 "Please make sure it has correct context and rights.",
get_run_dir());
1330 if (totem_config_warnings != 0) {
1357 "totemmrp.c,totemrrp.c,totemip.c,totemconfig.c,totemcrypto.c,totemsrp.c,"
1358 "totempg.c,totemiba.c,totemudp.c,totemudpu.c,totemnet.c");
1373 corosync_tty_detach ();
1376 corosync_poll_handle = qb_loop_create ();
1378 memset(&scheduler_pause_timeout_data, 0,
sizeof(scheduler_pause_timeout_data));
1380 timer_function_scheduler_timeout (&scheduler_pause_timeout_data);
1382 qb_loop_signal_add(corosync_poll_handle, QB_LOOP_LOW,
1383 SIGUSR2, NULL, sig_diag_handler, NULL);
1384 qb_loop_signal_add(corosync_poll_handle, QB_LOOP_HIGH,
1385 SIGINT, NULL, sig_exit_handler, NULL);
1386 qb_loop_signal_add(corosync_poll_handle, QB_LOOP_HIGH,
1387 SIGSEGV, NULL, sig_segv_handler, NULL);
1388 qb_loop_signal_add(corosync_poll_handle, QB_LOOP_HIGH,
1389 SIGABRT, NULL, sig_abrt_handler, NULL);
1390 qb_loop_signal_add(corosync_poll_handle, QB_LOOP_HIGH,
1391 SIGQUIT, NULL, sig_exit_handler, NULL);
1392 qb_loop_signal_add(corosync_poll_handle, QB_LOOP_HIGH,
1393 SIGTERM, NULL, sig_exit_handler, NULL);
1400 if ((flock_err = corosync_flock (corosync_lock_file, getpid ())) !=
COROSYNC_DONE_EXIT) {
1415 corosync_poll_handle,
1419 main_service_ready);
1422 &corosync_group_handle,
1427 corosync_group_handle,
1448 qb_loop_run (corosync_poll_handle);
1458 qb_loop_destroy (corosync_poll_handle);
1467 unlink (corosync_lock_file);
1471 return EXIT_SUCCESS;
int32_t cs_ipcs_q_level_get(void)
unsigned int corosync_service_defaults_link_and_init(struct corosync_api_v1 *corosync_api)
Load all of the default services.
void(*) in log_level_security)
const char * get_run_dir(void)
int corosync_quorum_is_quorate(void)
void totempg_finalize(void)
Totem Single Ring Protocol.
uint64_t memb_commit_token_rx
#define LOGSYS_LEVEL_INFO
void(* sync_init)(const unsigned int *trans_list, size_t trans_list_entries, const unsigned int *member_list, size_t member_list_entries, const struct memb_ring_id *ring_id)
#define LOGSYS_LEVEL_TRACE
void totempg_trans_ack(void)
struct totem_config * totem_config
void sync_start(const unsigned int *member_list, size_t member_list_entries, const struct memb_ring_id *ring_id)
void(* timer_delete)(corosync_timer_handle_t timer_handle)
qb_loop_timer_handle handle
totemsrp_token_stats_t token[TOTEM_TOKEN_STATS_MAX]
const char * totemip_print(const struct totem_ip_address *addr)
Totem Single Ring Protocol.
int(* sync_process)(void)
void(* exec_dump_fn)(void)
int sync_init(int(*sync_callbacks_retrieve)(int service_id, struct sync_callbacks *callbacks), void(*synchronization_completed)(void))
int totemip_parse(struct totem_ip_address *totemip, const char *addr, int family)
int coroparse_configparse(icmap_map_t config_map, const char **error_string)
int(* timer_add_duration)(unsigned long long nanoseconds_in_future, void *data, void(*timer_nf)(void *data), corosync_timer_handle_t *handle)
qb_loop_t * cs_poll_handle_get(void)
void corosync_recheck_the_q_level(void *data)
#define corosync_exit_error(err)
void(* exec_endian_convert_fn)(void *msg)
int totempg_groups_joined_release(int msg_count)
struct message_header header
uint64_t memb_merge_detect_rx
LOGSYS_DECLARE_SUBSYS("MAIN")
unsigned char addr[TOTEMIP_ADDRLEN]
void schedwrk_init(void(*serialize_lock_fn)(void), void(*serialize_unlock_fn)(void))
cs_error_t icmap_set_string(const char *key_name, const char *value)
int cs_poll_dispatch_add(qb_loop_t *handle, int fd, int events, void *data, int(*dispatch_fn)(int fd, int revents, void *data))
int totempg_groups_initialize(void **instance, void(*deliver_fn)(unsigned int nodeid, const void *msg, unsigned int msg_len, int endian_conversion_required), void(*confchg_fn)(enum totem_configuration_type configuration_type, const unsigned int *member_list, size_t member_list_entries, const unsigned int *left_list, size_t left_list_entries, const unsigned int *joined_list, size_t joined_list_entries, const struct memb_ring_id *ring_id))
Initialize a groups instance.
uint64_t gather_token_lost
void totemip_copy(struct totem_ip_address *addr1, const struct totem_ip_address *addr2)
icmap_map_t icmap_get_global_map(void)
unsigned long long max_tv_diff
struct corosync_service_engine * corosync_service[SERVICES_COUNT_MAX]
int _logsys_subsys_create(const char *subsys, const char *filename)
uint64_t memb_commit_token_tx
#define LOGSYS_PERROR(err_num, level, fmt, args...)
cs_error_t icmap_inc(const char *key_name)
#define log_printf(level, format, args...)
#define MAX_NO_CONT_SENDMSG_FAILURES
void(* exec_handler_fn)(const void *msg, unsigned int nodeid)
#define TOTEM_TOKEN_STATS_MAX
void cs_ipcs_sync_state_changed(int32_t sync_in_process)
int corosync_sending_allowed(unsigned int service, unsigned int id, const void *msg, void *sending_allowed_private_data)
int main_mcast(const struct iovec *iovec, unsigned int iov_len, unsigned int guarantee)
void cs_ipc_allow_connections(int32_t allow)
void corosync_service_unlink_all(struct corosync_api_v1 *api, void(*unlink_all_complete)(void))
Unlink and exit all corosync services.
uint64_t operational_entered
#define ICMAP_TRACK_DELETE
void totempg_service_ready_register(void(*totem_service_ready)(void))
void(* sync_activate)(void)
#define ICMAP_KEYNAME_MAXLEN
uint64_t operational_token_lost
#define MAX_NO_CONT_GATHER
Maximum number of continuous gather states.
uint64_t consensus_timeouts
int totem_config_keyread(struct totem_config *totem_config, const char **error_string)
uint64_t recovery_token_lost
#define LOGSYS_LEVEL_WARNING
#define ICMAP_TRACK_MODIFY
struct corosync_exec_handler * exec_engine
unsigned int totempg_my_nodeid_get(void)
cs_error_t icmap_set_uint32(const char *key_name, uint32_t value)
uint64_t commit_token_lost
uint64_t token_hold_cancel_rx
int logsys_thread_start(void)
int totem_config_validate(struct totem_config *totem_config, const char **error_string)
#define LOGSYS_MODE_OUTPUT_SYSLOG
int totempg_groups_joined_reserve(void *instance, const struct iovec *iovec, unsigned int iov_len)
#define LOGSYS_LEVEL_ERROR
struct totem_ip_address rep
void sync_save_transitional(const unsigned int *member_list, size_t member_list_entries, const struct memb_ring_id *ring_id)
int totempg_groups_mcast_joined(void *instance, const struct iovec *iovec, unsigned int iov_len, int guarantee)
const char * service_stats_tx[SERVICES_COUNT_MAX][SERVICE_HANDLER_MAXIMUM_COUNT]
cs_error_t icmap_get(const char *key_name, void *value, size_t *value_len, icmap_value_types_t *type)
int corosync_log_config_read(cmap_handle_t cmap_h, const char *default_logfile, const char **error_string)
void(* log_printf)(int level, int subsys, const char *function_name, const char *file_name, int file_line, const char *format,...) __attribute__((format(printf
#define LOGSYS_LEVEL_DEBUG
void(* sync_activate)(void)
int totempg_member_remove(const struct totem_ip_address *member, int ring_no)
void(* confchg_fn)(enum totem_configuration_type configuration_type, const unsigned int *member_list, size_t member_list_entries, const unsigned int *left_list, size_t left_list_entries, const unsigned int *joined_list, size_t joined_list_entries, const struct memb_ring_id *ring_id)
#define TOTEM_CONFIG_WARNING_MEMBERS_DEPRECATED
#define TOTEM_CONFIG_WARNING_MEMBERS_IGNORED
uint32_t continuous_gather
cs_error_t icmap_set_uint64(const char *key_name, uint64_t value)
cs_error_t icmap_fast_inc(const char *key_name)
#define MILLI_2_NANO_SECONDS
void message_source_set(mar_message_source_t *source, void *conn)
int(* sync_process)(void)
void logsys_config_apply(void)
uint64_t token_hold_cancel_tx
unsigned int token_timeout
void totempg_check_q_level(void *instance)
const char * service_stats_rx[SERVICES_COUNT_MAX][SERVICE_HANDLER_MAXIMUM_COUNT]
struct corosync_api_v1 * apidef_get(void)
void corosync_sending_allowed_release(void *sending_allowed_private_data)
void cs_ipcs_stats_update(void)
uint64_t memb_merge_detect_tx
#define SERVICES_COUNT_MAX
unsigned long long tv_prev
void corosync_state_dump(void)
qb_loop_timer_handle corosync_timer_handle_t
int cs_poll_dispatch_delete(qb_loop_t *handle, int fd)
void(* sync_init)(const unsigned int *trans_list, size_t trans_list_entries, const unsigned int *member_list, size_t member_list_entries, const struct memb_ring_id *ring_id)
int message_source_is_local(const mar_message_source_t *source)
struct totem_logging_configuration totem_logging_configuration
int totempg_groups_join(void *instance, const struct totempg_group *groups, size_t group_cnt)
#define LOGSYS_LEVEL_NOTICE
cs_error_t icmap_set_uint8(const char *key_name, uint8_t value)
uint64_t recovery_entered
cs_error_t icmap_set_ro_access(const char *key_name, int prefix, int ro_access)
int totempg_initialize(qb_loop_t *poll_handle, struct totem_config *totem_config)
Initialize the totem process groups abstraction.
void corosync_shutdown_request(void)
struct sched_param global_sched_param
uint32_t continuous_sendmsg_failures
struct memb_ring_id ring_id
const char *(* totem_ifaces_print)(unsigned int nodeid)
int main(int argc, char **argv, char **envp)
cs_error_t icmap_init(void)
#define TOTEM_CONFIG_WARNING_TOTEM_NODEID_IGNORED
LOGSYS_DECLARE_SYSTEM("corosync", LOGSYS_MODE_OUTPUT_STDERR|LOGSYS_MODE_OUTPUT_SYSLOG, LOG_DAEMON, LOG_INFO)
#define LOGSYS_MODE_OUTPUT_STDERR
void *(* totem_get_stats)(void)
cs_error_t icmap_track_add(const char *key_name, int32_t track_type, icmap_notify_fn_t notify_fn, void *user_data, icmap_track_t *icmap_track)
int totem_config_read(struct totem_config *totem_config, const char **error_string, uint64_t *warnings)
void(* totem_memb_ring_id_create_or_load)(struct memb_ring_id *memb_ring_id, const struct totem_ip_address *addr)
#define ICMAP_TRACK_PREFIX
void logsys_system_fini(void)
void(* totem_memb_ring_id_store)(const struct memb_ring_id *memb_ring_id, const struct totem_ip_address *addr)
int totempg_member_add(const struct totem_ip_address *member, int ring_no)