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> 99 #ifdef HAVE_LIBSYSTEMD 100 #include <systemd/sd-daemon.h> 103 #include <qb/qbdefs.h> 104 #include <qb/qblog.h> 105 #include <qb/qbloop.h> 106 #include <qb/qbutil.h> 107 #include <qb/qbipcs.h> 130 #ifdef HAVE_SMALL_MEMORY_FOOTPRINT 131 #define IPC_LOGSYS_SIZE 1024*64 133 #define IPC_LOGSYS_SIZE 8192*128 148 #define SERVER_BACKLOG 5 150 static int sched_priority = 0;
152 static unsigned int service_count = 32;
158 static int sync_in_process = 1;
160 static qb_loop_t *corosync_poll_handle;
166 static const char *corosync_lock_file =
LOCALSTATEDIR"/run/corosync.pid";
168 static char corosync_config_file[PATH_MAX + 1] =
COROSYSCONFDIR "/corosync.conf";
172 return (corosync_poll_handle);
180 int (*dispatch_fn) (
int fd,
184 return qb_loop_poll_add(handle, QB_LOOP_MED, fd, events, data,
190 return qb_loop_poll_del(handle, fd);
207 return (corosync_config_file);
210 static void corosync_blackbox_write_to_file (
void)
212 char fname[PATH_MAX];
213 char fdata_fname[PATH_MAX];
214 char time_str[PATH_MAX];
215 struct tm cur_time_tm;
219 cur_time_t = time(NULL);
220 localtime_r(&cur_time_t, &cur_time_tm);
222 strftime(time_str, PATH_MAX,
"%Y-%m-%dT%H:%M:%S", &cur_time_tm);
223 if (snprintf(fname, PATH_MAX,
"%s/fdata-%s-%lld",
226 (
long long int)getpid()) >= PATH_MAX) {
231 if ((res = qb_log_blackbox_write_to_file(fname)) < 0) {
235 snprintf(fdata_fname,
sizeof(fdata_fname),
"%s/fdata",
get_state_dir());
237 if (symlink(fname, fdata_fname) == -1) {
243 static void unlink_all_completed (
void)
246 qb_loop_stop (corosync_poll_handle);
255 static int32_t sig_diag_handler (
int num,
void *data)
261 static int32_t sig_exit_handler (
int num,
void *data)
268 static void sigsegv_handler (
int num)
270 (void)signal (num, SIG_DFL);
271 corosync_blackbox_write_to_file ();
276 #define LOCALHOST_IP inet_addr("127.0.0.1") 278 static void *corosync_group_handle;
285 static void serialize_lock (
void)
289 static void serialize_unlock (
void)
293 static void corosync_sync_completed (
void)
296 "Completed service synchronization, ready to provide service.");
306 #ifdef HAVE_LIBSYSTEMD 307 sd_notify (0,
"READY=1");
311 static int corosync_sync_callbacks_retrieve (
319 if (callbacks == NULL) {
334 static void member_object_joined (
unsigned int nodeid)
341 "runtime.members.%u.ip", nodeid);
343 "runtime.members.%u.join_count", nodeid);
345 "runtime.members.%u.status", nodeid);
360 static void member_object_left (
unsigned int nodeid)
365 "runtime.members.%u.status", nodeid);
372 static void confchg_fn (
374 const unsigned int *member_list,
size_t member_list_entries,
375 const unsigned int *left_list,
size_t left_list_entries,
376 const unsigned int *joined_list,
size_t joined_list_entries,
380 int abort_activate = 0;
382 if (sync_in_process == 1) {
387 memcpy (&corosync_ring_id, ring_id,
sizeof (
struct memb_ring_id));
389 for (i = 0; i < left_list_entries; i++) {
390 member_object_left (left_list[i]);
392 for (i = 0; i < joined_list_entries; i++) {
393 member_object_joined (joined_list[i]);
398 for (i = 0; i < service_count; i++) {
401 member_list, member_list_entries,
402 left_list, left_list_entries,
403 joined_list, joined_list_entries, ring_id);
407 if (abort_activate) {
414 sync_start (member_list, member_list_entries, ring_id);
418 static void priv_drop (
void)
423 static void corosync_tty_detach (
void)
451 devnull = open(
"/dev/null", O_RDWR);
456 if (dup2(devnull, 0) < 0 || dup2(devnull, 1) < 0
457 || dup2(devnull, 2) < 0) {
464 static void corosync_mlockall (
void)
467 struct rlimit rlimit;
469 rlimit.rlim_cur = RLIM_INFINITY;
470 rlimit.rlim_max = RLIM_INFINITY;
472 #ifndef RLIMIT_MEMLOCK 473 #define RLIMIT_MEMLOCK RLIMIT_VMEM 478 res = mlockall (MCL_CURRENT | MCL_FUTURE);
481 "Could not lock memory of service to avoid page faults");
486 static void corosync_totem_stats_updater (
void *data)
489 uint32_t total_mtt_rx_token;
490 uint32_t total_backlog_calc;
491 uint32_t total_token_holdtime;
506 cstr =
"number of multicast sendmsg failures is above threshold";
510 cstr =
"totem is continuously in gather state";
514 "Totem is unable to form a cluster because of an " 515 "operating system or network fault (reason: %s). The most common " 516 "cause of this message is that the local firewall is " 517 "configured improperly.", cstr);
523 total_mtt_rx_token = 0;
524 total_token_holdtime = 0;
525 total_backlog_calc = 0;
557 corosync_totem_stats_updater,
558 &corosync_stats_timer_handle);
561 static void corosync_totem_stats_init (
void)
565 corosync_totem_stats_updater,
566 &corosync_stats_timer_handle);
569 static void deliver_fn (
572 unsigned int msg_len,
573 int endian_conversion_required)
575 const struct qb_ipc_request_header *
header;
581 if (endian_conversion_required) {
604 if (endian_conversion_required) {
605 assert(
corosync_service[service]->exec_engine[fn_id].exec_endian_convert_fn != NULL);
615 const struct iovec *iovec,
616 unsigned int iov_len,
619 const struct qb_ipc_request_header *req = iovec->iov_base;
623 service = req->id >> 16;
624 fn_id = req->id & 0xffff;
633 static void corosync_ring_id_create_or_load (
639 char filename[PATH_MAX];
641 snprintf (filename,
sizeof(filename),
"%s/ringid_%u",
643 fd = open (filename, O_RDONLY, 0700);
648 res = read (fd, &memb_ring_id->
seq, sizeof (uint64_t));
654 if ((fd == -1) || (res !=
sizeof (uint64_t))) {
655 memb_ring_id->
seq = 0;
657 fd = open (filename, O_CREAT|O_RDWR, 0700);
659 res = write (fd, &memb_ring_id->
seq, sizeof (uint64_t));
663 "Couldn't write ringid file '%s'", filename);
669 "Couldn't create ringid file '%s'", filename);
678 static void corosync_ring_id_store (
679 const struct memb_ring_id *memb_ring_id,
682 char filename[PATH_MAX];
686 snprintf (filename,
sizeof(filename),
"%s/ringid_%u",
689 fd = open (filename, O_WRONLY, 0700);
691 fd = open (filename, O_CREAT|O_RDWR, 0700);
695 "Couldn't store new ring id %llx to stable storage",
701 "Storing new sequence id for ring %llx", memb_ring_id->
seq);
702 res = write (fd, &memb_ring_id->
seq,
sizeof(memb_ring_id->
seq));
704 if (res !=
sizeof(memb_ring_id->
seq)) {
706 "Couldn't store new ring id %llx to stable storage",
713 static qb_loop_timer_handle recheck_the_q_level_timer;
729 unsigned int service,
732 void *sending_allowed_private_data)
736 struct iovec reserve_iovec;
737 struct qb_ipc_request_header *
header = (
struct qb_ipc_request_header *)msg;
740 reserve_iovec.iov_base = (
char *)header;
741 reserve_iovec.iov_len = header->size;
744 corosync_group_handle,
755 sending_allowed = QB_FALSE;
761 sending_allowed = QB_TRUE;
763 sending_allowed = QB_TRUE;
770 return -EHOSTUNREACH;
773 return (sending_allowed);
791 assert (source != NULL);
802 assert ((source != NULL) && (conn != NULL));
815 static void timer_function_scheduler_timeout (
void *data)
818 unsigned long long tv_current;
819 unsigned long long tv_diff;
821 tv_current = qb_util_nano_current_get ();
823 if (timeout_data->
tv_prev == 0) {
827 timeout_data->
tv_prev = tv_current;
831 tv_diff = tv_current - timeout_data->
tv_prev;
832 timeout_data->
tv_prev = tv_current;
836 "(threshold is %0.4f ms). Consider token timeout increase.",
837 (
float)tv_diff / QB_TIME_NS_IN_MSEC, (
float)timeout_data->
max_tv_diff / QB_TIME_NS_IN_MSEC);
844 qb_loop_timer_add (corosync_poll_handle,
848 timer_function_scheduler_timeout,
853 static int corosync_set_rr_scheduler (
void)
857 #if defined(HAVE_PTHREAD_SETSCHEDPARAM) && defined(HAVE_SCHED_GET_PRIORITY_MAX) && defined(HAVE_SCHED_SETSCHEDULER) 860 sched_priority = sched_get_priority_max (SCHED_RR);
861 if (sched_priority != -1) {
866 "Could not set SCHED_RR at priority %d",
870 #ifdef HAVE_QB_LOG_THREAD_PRIORITY_SET 871 qb_log_thread_priority_set (SCHED_OTHER, 0);
879 #ifdef HAVE_QB_LOG_THREAD_PRIORITY_SET 880 res = qb_log_thread_priority_set (SCHED_RR, sched_priority);
886 "Could not set logsys thread priority." 887 " Can't continue because of priority inversions.");
893 "Could not get maximum scheduler priority");
899 "The Platform is missing process priority setting features. Leaving at default.");
909 static const char *corosync_basename(
const char *file_name)
912 base = strrchr (file_name,
'/');
921 _logsys_log_printf(
int level,
int subsys,
922 const char *function_name,
923 const char *file_name,
929 _logsys_log_printf(
int level,
int subsys,
930 const char *function_name,
931 const char *file_name,
933 const char *format, ...)
937 va_start(ap, format);
938 qb_log_from_external_source_va(function_name, corosync_basename(file_name),
939 format, level, file_line,
944 static void fplay_key_change_notify_fn (
946 const char *key_name,
951 if (strcmp(key_name,
"runtime.blackbox.dump_flight_data") == 0) {
952 fprintf(stderr,
"Writetofile\n");
953 corosync_blackbox_write_to_file ();
955 if (strcmp(key_name,
"runtime.blackbox.dump_state") == 0) {
956 fprintf(stderr,
"statefump\n");
961 static void corosync_fplay_control_init (
void)
970 fplay_key_change_notify_fn,
974 fplay_key_change_notify_fn,
978 static void force_gather_notify_fn(
980 const char *key_name,
992 if (strcmp(key_name,
"runtime.force_gather") == 0) {
1001 static void corosync_force_gather_init (
void)
1009 force_gather_notify_fn,
1020 static void set_icmap_ro_keys_flag (
void)
1053 static void main_service_ready (
void)
1066 corosync_totem_stats_init ();
1067 corosync_fplay_control_init ();
1068 corosync_force_gather_init ();
1071 corosync_sync_callbacks_retrieve,
1072 corosync_sync_completed);
1075 static enum e_corosync_done corosync_flock (
const char *lockfile, pid_t pid)
1085 lf = open (lockfile, O_WRONLY | O_CREAT, 0640);
1092 lock.l_type = F_WRLCK;
1094 lock.l_whence = SEEK_SET;
1096 if (fcntl (lf, F_SETLK, &lock) == -1) {
1116 if (ftruncate (lf, 0) == -1) {
1120 goto error_close_unlink;
1123 memset (pid_s, 0,
sizeof (pid_s));
1124 snprintf (pid_s,
sizeof (pid_s) - 1,
"%u\n", pid);
1127 if (write (lf, pid_s, strlen (pid_s)) != strlen (pid_s)) {
1128 if (errno == EINTR) {
1132 "Error was %s", strerror (errno));
1134 goto error_close_unlink;
1138 if ((fd_flag = fcntl (lf, F_GETFD, 0)) == -1) {
1140 "Error was %s", strerror (errno));
1142 goto error_close_unlink;
1144 fd_flag |= FD_CLOEXEC;
1145 if (fcntl (lf, F_SETFD, fd_flag) == -1) {
1147 "Error was %s", strerror (errno));
1149 goto error_close_unlink;
1162 static int corosync_move_to_root_cgroup(
void) {
1173 f = fopen(
"/sys/fs/cgroup/cpu/cpu.rt_runtime_us",
"rt");
1176 "system without cgroup or with disabled CONFIG_RT_GROUP_SCHED");
1183 f = fopen(
"/sys/fs/cgroup/cpu/tasks",
"w");
1190 if (fprintf(f,
"%jd\n", (intmax_t)getpid()) <= 0) {
1193 goto close_and_exit_res;
1197 if (fclose(f) != 0) {
1208 int main (
int argc,
char **argv,
char **envp)
1210 const char *error_string;
1213 int background, sched_rr, prio, testonly, move_to_root_cgroup;
1214 struct stat stat_out;
1216 uint64_t totem_config_warnings;
1221 int log_subsys_id_totem;
1228 while ((ch = getopt (argc, argv,
"c:ftv")) != EOF) {
1232 res = snprintf(corosync_config_file,
sizeof(corosync_config_file),
"%s", optarg);
1233 if (res >=
sizeof(corosync_config_file)) {
1234 fprintf (stderr,
"Config file path too long.\n");
1238 return EXIT_FAILURE;
1248 printf (
"Corosync Cluster Engine, version '%s'\n",
VERSION);
1249 printf (
"Copyright (c) 2006-2018 Red Hat, Inc.\n");
1251 return EXIT_SUCCESS;
1257 " -c : Corosync config file path.\n"\
1258 " -f : Start application in foreground.\n"\
1259 " -t : Test configuration and exit.\n"\
1260 " -v : Display version and SVN revision of Corosync and exit.\n");
1262 return EXIT_FAILURE;
1270 (void)signal (SIGSEGV, sigsegv_handler);
1271 (void)signal (SIGABRT, sigsegv_handler);
1272 #if MSG_NOSIGNAL != 0 1273 (void)signal (SIGPIPE, SIG_IGN);
1277 fprintf (stderr,
"Corosync Executive couldn't initialize configuration component.\n");
1278 syslog (
LOGSYS_LEVEL_ERROR,
"Corosync Executive couldn't initialize configuration component.");
1281 set_icmap_ro_keys_flag();
1294 fprintf (stderr,
"%s\n", error_string);
1300 fprintf (stderr,
"Corosync Executive couldn't initialize statistics component.\n");
1301 syslog (
LOGSYS_LEVEL_ERROR,
"Corosync Executive couldn't initialize statistics component.");
1315 fprintf(stderr,
"%s", error_string);
1329 "totemip.c,totemconfig.c,totemcrypto.c,totemsrp.c," 1330 "totempg.c,totemudp.c,totemudpu.c,totemnet.c,totemknet.c");
1336 if ((res == -1) || (res == 0 && !S_ISDIR(stat_out.st_mode))) {
1344 "Please make sure it has correct context and rights.",
get_state_dir());
1368 "Nodelist one is going to be used.");
1371 if (totem_config_warnings != 0) {
1392 move_to_root_cgroup = 1;
1394 if (strcmp(tmp_str,
"yes") != 0) {
1395 move_to_root_cgroup = 0;
1404 if (move_to_root_cgroup) {
1405 (void)corosync_move_to_root_cgroup();
1410 if (strcmp(tmp_str,
"yes") != 0) {
1418 if (strcmp(tmp_str,
"max") == 0) {
1420 }
else if (strcmp(tmp_str,
"min") == 0) {
1425 tmpli = strtol(tmp_str, &ep, 10);
1426 if (errno != 0 || *ep !=
'\0' || tmpli > INT_MAX || tmpli < INT_MIN) {
1441 if (corosync_set_rr_scheduler () != 0) {
1449 if (setpriority(PRIO_PGRP, 0, prio) != 0) {
1451 "Could not set priority %d", prio);
1477 corosync_tty_detach ();
1488 corosync_mlockall ();
1490 corosync_poll_handle = qb_loop_create ();
1492 memset(&scheduler_pause_timeout_data, 0,
sizeof(scheduler_pause_timeout_data));
1494 timer_function_scheduler_timeout (&scheduler_pause_timeout_data);
1496 qb_loop_signal_add(corosync_poll_handle, QB_LOOP_LOW,
1497 SIGUSR2, NULL, sig_diag_handler, NULL);
1498 qb_loop_signal_add(corosync_poll_handle, QB_LOOP_HIGH,
1499 SIGINT, NULL, sig_exit_handler, NULL);
1500 qb_loop_signal_add(corosync_poll_handle, QB_LOOP_HIGH,
1501 SIGQUIT, NULL, sig_exit_handler, NULL);
1502 qb_loop_signal_add(corosync_poll_handle, QB_LOOP_HIGH,
1503 SIGTERM, NULL, sig_exit_handler, NULL);
1510 if ((flock_err = corosync_flock (corosync_lock_file, getpid ())) !=
COROSYNC_DONE_EXIT) {
1525 corosync_poll_handle,
1526 &totem_config) != 0) {
1533 main_service_ready);
1536 &corosync_group_handle,
1541 corosync_group_handle,
1562 qb_loop_run (corosync_poll_handle);
1572 qb_loop_destroy (corosync_poll_handle);
1581 unlink (corosync_lock_file);
1585 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.
int corosync_quorum_is_quorate(void)
void(* timer_delete)(corosync_timer_handle_t timer_handle)
void totempg_finalize(void)
Totem Single Ring Protocol.
int(* timer_add_duration)(unsigned long long nanoseconds_in_future, void *data, void(*timer_nf)(void *data), corosync_timer_handle_t *handle)
#define LOGSYS_LEVEL_INFO
#define LOGSYS_LEVEL_TRACE
void totempg_trans_ack(void)
struct totem_config * totem_config
void *(* totem_get_stats)(void)
void logsys_blackbox_postfork(void)
void sync_start(const unsigned int *member_list, size_t member_list_entries, const struct memb_ring_id *ring_id)
qb_loop_timer_handle handle
void(* exec_dump_fn)(void)
totemsrp_token_stats_t token[TOTEM_TOKEN_STATS_MAX]
Totem Single Ring Protocol.
cs_error_t stats_map_init(const struct corosync_api_v1 *corosync_api)
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 sync_init(int(*sync_callbacks_retrieve)(int service_id, struct sync_callbacks *callbacks), void(*synchronization_completed)(void))
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 coroparse_configparse(icmap_map_t config_map, const char **error_string)
qb_loop_t * cs_poll_handle_get(void)
void corosync_recheck_the_q_level(void *data)
#define corosync_exit_error(err)
void stats_trigger_trackers()
int totempg_groups_joined_release(int msg_count)
totem_configuration_type
The totem_configuration_type enum.
void(* totem_memb_ring_id_create_or_load)(struct memb_ring_id *memb_ring_id, unsigned int nodeid)
#define TOTEM_TOKEN_STATS_MAX
uint32_t avg_token_workload
LOGSYS_DECLARE_SUBSYS("MAIN")
void(* sync_activate)(void)
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)
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)
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.
icmap_map_t icmap_get_global_map(void)
Return global icmap.
unsigned long long max_tv_diff
void totempg_force_gather(void)
struct corosync_service_engine * corosync_service[SERVICES_COUNT_MAX]
int _logsys_subsys_create(const char *subsys, const char *filename)
_logsys_subsys_create
#define LOGSYS_PERROR(err_num, level, fmt, args...)
The LOGSYS_PERROR macro.
cs_error_t icmap_inc(const char *key_name)
Increase stored value by one.
#define log_printf(level, format, args...)
#define MAX_NO_CONT_SENDMSG_FAILURES
void(* exec_handler_fn)(const void *msg, unsigned int nodeid)
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)
void logsys_blackbox_prefork(void)
void icmap_fini(void)
Finalize global icmap.
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.
void(* sync_activate)(void)
LOGSYS_DECLARE_SYSTEM("corosync", LOGSYS_MODE_OUTPUT_STDERR|LOGSYS_MODE_OUTPUT_SYSLOG, LOG_DAEMON, LOG_EMERG)
#define ICMAP_TRACK_DELETE
void(*) in log_level_security)
void totempg_service_ready_register(void(*totem_service_ready)(void))
#define ICMAP_KEYNAME_MAXLEN
Maximum length of key in icmap.
#define MAX_NO_CONT_GATHER
Maximum number of continuous gather states.
int totem_config_keyread(struct totem_config *totem_config, const char **error_string)
#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 time_since_token_last_received
const char * corosync_get_config_file(void)
int logsys_thread_start(void)
logsys_thread_start
int(* sync_process)(void)
int totem_config_validate(struct totem_config *totem_config, const char **error_string)
#define TOTEM_CONFIG_BINDNETADDR_NODELIST_SET
#define LOGSYS_MODE_OUTPUT_SYSLOG
int totempg_groups_joined_reserve(void *instance, const struct iovec *iovec, unsigned int iov_len)
#define LOGSYS_LEVEL_ERROR
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)
Retrieve value of key key_name and store it in user preallocated value pointer.
int corosync_log_config_read(cmap_handle_t cmap_h, const char *default_logfile, const char **error_string)
#define LOGSYS_LEVEL_DEBUG
uint8_t firewall_enabled_or_nic_failure
The corosync_api_v1 struct.
#define TOTEM_CONFIG_WARNING_MEMBERS_DEPRECATED
uint32_t avg_backlog_calc
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 TOTEM_CONFIG_WARNING_MEMBERS_IGNORED
struct totem_message_header header
#define swab32(x)
The swab32 macro.
uint32_t continuous_gather
cs_error_t icmap_fast_inc(const char *key_name)
Increase stored value by one.
#define MILLI_2_NANO_SECONDS
void(* totem_memb_ring_id_store)(const struct memb_ring_id *memb_ring_id, unsigned int nodeid)
void message_source_set(mar_message_source_t *source, void *conn)
void logsys_config_apply(void)
logsys_config_apply
unsigned int token_timeout
void totempg_check_q_level(void *instance)
const char * service_stats_rx[SERVICES_COUNT_MAX][SERVICE_HANDLER_MAXIMUM_COUNT]
void(* exec_endian_convert_fn)(void *msg)
struct corosync_api_v1 * apidef_get(void)
void corosync_sending_allowed_release(void *sending_allowed_private_data)
#define SERVICES_COUNT_MAX
unsigned long long tv_prev
const char *(* totem_ifaces_print)(unsigned int nodeid)
const char * get_state_dir(void)
void corosync_state_dump(void)
qb_loop_timer_handle corosync_timer_handle_t
corosync_timer_handle_t
int cs_poll_dispatch_delete(qb_loop_t *handle, int fd)
cs_error_t icmap_get_string(const char *key_name, char **str)
Shortcut for icmap_get for string type.
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_ro_access(const char *key_name, int prefix, int ro_access)
Set read-only access for given key (key_name) or prefix, If prefix is set.
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
int main(int argc, char **argv, char **envp)
cs_error_t icmap_init(void)
Initialize global icmap.
#define TOTEM_CONFIG_WARNING_TOTEM_NODEID_IGNORED
#define LOGSYS_MODE_OUTPUT_STDERR
Structure passed as new_value and old_value in change callback.
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)
Add tracking function for given key_name.
int totem_config_read(struct totem_config *totem_config, const char **error_string, uint64_t *warnings)
int(* sync_process)(void)
The mar_message_source_t struct.
void logsys_system_fini(void)
logsys_system_fini