44 #include <sys/socket.h>
45 #include <sys/types.h>
50 #include <netinet/in.h>
51 #include <arpa/inet.h>
52 #include <sys/param.h>
53 #include <sys/utsname.h>
56 #include <qb/qblist.h>
57 #include <qb/qbdefs.h>
67 #define TOKEN_RETRANSMITS_BEFORE_LOSS_CONST 4
68 #define TOKEN_TIMEOUT 1000
69 #define TOKEN_WARNING 75
70 #define TOKEN_COEFFICIENT 650
71 #define JOIN_TIMEOUT 50
72 #define MERGE_TIMEOUT 200
73 #define DOWNCHECK_TIMEOUT 1000
74 #define FAIL_TO_RECV_CONST 2500
75 #define SEQNO_UNCHANGED_CONST 30
76 #define MINIMUM_TIMEOUT (int)(1000/HZ)*3
77 #define MAX_NETWORK_DELAY 50
78 #define WINDOW_SIZE 50
79 #define MAX_MESSAGES 17
80 #define MISS_COUNT_CONST 5
83 #define KNET_PING_INTERVAL 1000
84 #define KNET_PING_TIMEOUT 2000
85 #define KNET_PING_PRECISION 2048
86 #define KNET_PONG_COUNT 2
87 #define KNET_PMTUD_INTERVAL 30
88 #define KNET_DEFAULT_TRANSPORT KNET_TRANSPORT_UDP
90 #define DEFAULT_PORT 5405
92 static char error_string_response[768];
98 if (strcmp(param_name,
"totem.token") == 0)
100 if (strcmp(param_name,
"totem.token_warning") == 0)
102 if (strcmp(param_name,
"totem.token_retransmit") == 0)
104 if (strcmp(param_name,
"totem.hold") == 0)
106 if (strcmp(param_name,
"totem.token_retransmits_before_loss_const") == 0)
108 if (strcmp(param_name,
"totem.join") == 0)
110 if (strcmp(param_name,
"totem.send_join") == 0)
112 if (strcmp(param_name,
"totem.consensus") == 0)
114 if (strcmp(param_name,
"totem.merge") == 0)
116 if (strcmp(param_name,
"totem.downcheck") == 0)
118 if (strcmp(param_name,
"totem.fail_recv_const") == 0)
120 if (strcmp(param_name,
"totem.seqno_unchanged_const") == 0)
122 if (strcmp(param_name,
"totem.heartbeat_failures_allowed") == 0)
124 if (strcmp(param_name,
"totem.max_network_delay") == 0)
126 if (strcmp(param_name,
"totem.window_size") == 0)
128 if (strcmp(param_name,
"totem.max_messages") == 0)
130 if (strcmp(param_name,
"totem.miss_count_const") == 0)
132 if (strcmp(param_name,
"totem.knet_pmtud_interval") == 0)
134 if (strcmp(param_name,
"totem.knet_compression_threshold") == 0)
136 if (strcmp(param_name,
"totem.knet_compression_level") == 0)
138 if (strcmp(param_name,
"totem.knet_compression_model") == 0)
149 const char *key_name,
const char *deleted_key,
unsigned int default_value,
150 int allow_zero_value)
155 (deleted_key != NULL && strcmp(deleted_key, key_name) == 0) ||
156 (!allow_zero_value && *(uint32_t *)totem_get_param_by_name(
totem_config, key_name) == 0)) {
157 *(uint32_t *)totem_get_param_by_name(
totem_config, key_name) = default_value;
170 strcpy(runtime_key_name,
"runtime.config.");
171 strcat(runtime_key_name, key_name);
177 const char *key_name,
const char *deleted_key,
int default_value,
178 int allow_zero_value)
183 (deleted_key != NULL && strcmp(deleted_key, key_name) == 0) ||
184 (!allow_zero_value && *(int32_t *)totem_get_param_by_name(
totem_config, key_name) == 0)) {
185 *(int32_t *)totem_get_param_by_name(
totem_config, key_name) = default_value;
198 strcpy(runtime_key_name,
"runtime.config.");
199 strcat(runtime_key_name, key_name);
205 const char *key_name,
const char *deleted_key,
const char *default_value)
209 void *old_config_ptr;
211 config_value = totem_get_param_by_name(
totem_config, key_name);
212 old_config_ptr = *config_value;
214 (deleted_key != NULL && strcmp(deleted_key, key_name) == 0)) {
217 *config_value = strdup(default_value);
219 free(old_config_ptr);
231 strcpy(runtime_key_name,
"runtime.config.");
232 strcat(runtime_key_name, key_name);
247 totem_volatile_config_set_uint32_value(
totem_config,
"totem.token_retransmits_before_loss_const", deleted_key,
274 totem_volatile_config_set_uint32_value(
totem_config,
"totem.token_retransmit", deleted_key,
277 totem_volatile_config_set_uint32_value(
totem_config,
"totem.hold", deleted_key,
282 totem_volatile_config_set_uint32_value(
totem_config,
"totem.consensus", deleted_key,
291 totem_volatile_config_set_uint32_value(
totem_config,
"totem.seqno_unchanged_const", deleted_key,
294 totem_volatile_config_set_uint32_value(
totem_config,
"totem.send_join", deleted_key, 0, 1);
296 totem_volatile_config_set_uint32_value(
totem_config,
"totem.heartbeat_failures_allowed", deleted_key, 0, 1);
298 totem_volatile_config_set_uint32_value(
totem_config,
"totem.knet_compression_threshold", deleted_key, 0, 1);
300 totem_volatile_config_set_int32_value(
totem_config,
"totem.knet_compression_level", deleted_key, 0, 1);
302 totem_volatile_config_set_string_value(
totem_config,
"totem.knet_compression_model", deleted_key,
"none");
307 static int totem_volatile_config_validate (
309 const char **error_string)
311 static char local_error_reason[512];
312 const char *error_reason = local_error_reason;
315 int i, num_configured, members;
318 snprintf (local_error_reason,
sizeof(local_error_reason),
319 "The max_network_delay parameter (%d ms) may not be less than (%d ms).",
325 snprintf (local_error_reason,
sizeof(local_error_reason),
326 "The token timeout parameter (%d ms) may not be less than (%d ms).",
332 snprintf (local_error_reason,
sizeof(local_error_reason),
333 "The token warning parameter (%d%%) must be between 0 (disabled) and 100.",
339 snprintf (local_error_reason,
sizeof(local_error_reason),
340 "The token retransmit timeout parameter (%d ms) may not be less than (%d ms).",
346 snprintf (local_error_reason,
sizeof(local_error_reason),
347 "The token hold timeout parameter (%d ms) may not be less than (%d ms).",
353 snprintf (local_error_reason,
sizeof(local_error_reason),
354 "The join timeout parameter (%d ms) may not be less than (%d ms).",
360 snprintf (local_error_reason,
sizeof(local_error_reason),
361 "The consensus timeout parameter (%d ms) may not be less than (%d ms).",
367 snprintf (local_error_reason,
sizeof(local_error_reason),
368 "The consensus timeout parameter (%d ms) may not be less than join timeout (%d ms).",
374 snprintf (local_error_reason,
sizeof(local_error_reason),
375 "The merge timeout parameter (%d ms) may not be less than (%d ms).",
381 snprintf (local_error_reason,
sizeof(local_error_reason),
382 "The downcheck timeout parameter (%d ms) may not be less than (%d ms).",
395 if (num_configured > 1) {
399 snprintf(name_key,
sizeof(name_key),
"nodelist.node.%d.name", i);
402 snprintf (local_error_reason,
sizeof(local_error_reason),
403 "for a multi-link configuration, all nodes must have a 'name' attribute");
408 for (i=0; i<num_configured; i++) {
410 snprintf (local_error_reason,
sizeof(local_error_reason),
411 "Not all nodes have the same number of links");
423 snprintf (error_string_response,
sizeof(error_string_response),
424 "parse error in config: %s\n", error_reason);
425 *error_string = error_string_response;
433 const char *tmp_cipher;
434 const char *tmp_hash;
435 const char *tmp_model;
442 if (strcmp(str,
"nss") == 0) {
445 if (strcmp(str,
"openssl") == 0) {
446 tmp_model =
"openssl";
454 if (strcmp(str,
"none") == 0) {
457 if (strcmp(str,
"aes256") == 0) {
458 tmp_cipher =
"aes256";
460 if (strcmp(str,
"aes192") == 0) {
461 tmp_cipher =
"aes192";
463 if (strcmp(str,
"aes128") == 0) {
464 tmp_cipher =
"aes128";
466 if (strcmp(str,
"3des") == 0) {
473 if (strcmp(str,
"none") == 0) {
476 if (strcmp(str,
"md5") == 0) {
479 if (strcmp(str,
"sha1") == 0) {
482 if (strcmp(str,
"sha256") == 0) {
485 if (strcmp(str,
"sha384") == 0) {
488 if (strcmp(str,
"sha512") == 0) {
494 if ((strcmp(tmp_cipher,
"none") != 0) &&
495 (strcmp(tmp_hash,
"none") == 0)) {
496 *error_string =
"crypto_cipher requires crypto_hash with value other than none";
500 if (strcmp(tmp_model,
"none") == 0) {
501 *error_string =
"crypto_model should be 'nss' or 'openssl'";
516 static int nodelist_byname(
const char *find_name,
int strip_domain)
519 const char *iter_key;
522 unsigned int node_pos;
524 unsigned int namelen;
528 res = sscanf(iter_key,
"nodelist.node.%u.%s", &node_pos, name_str);
533 if (strcmp(name_str,
"name") && strcmp(name_str,
"ring0_addr")) {
539 namelen = strlen(name);
543 dot = strchr(name,
'.');
545 namelen = name - dot - 1;
548 if (strncmp(find_name, name, namelen) == 0 &&
549 strlen(find_name) == strlen(name)) {
559 static int ipaddr_equal(
struct sockaddr_storage *addr1,
struct sockaddr_storage *addr2)
563 if (addr1->ss_family != addr2->ss_family)
566 if (addr1->ss_family == AF_INET) {
567 addrlen =
sizeof(
struct sockaddr_in);
569 if (addr1->ss_family == AF_INET6) {
570 addrlen =
sizeof(
struct sockaddr_in6);
574 if (memcmp(addr1, addr2, addrlen) == 0)
585 static int find_local_node(
int use_cache)
587 char nodename2[PATH_MAX];
590 const char *iter_key;
591 unsigned int cached_pos;
594 struct ifaddrs *ifa, *ifa_list;
599 struct utsname utsname;
608 res = uname(&utsname);
612 node = utsname.nodename;
615 node_pos = nodelist_byname(node, 0);
624 strcpy(nodename2, node);
625 dot = strrchr(nodename2,
'.');
629 node_pos = nodelist_byname(nodename2, 0);
634 dot = strrchr(nodename2,
'.');
637 node_pos = nodelist_byname(nodename2, 1);
647 if (getifaddrs(&ifa_list))
650 for (ifa = ifa_list; ifa; ifa = ifa->ifa_next) {
654 strcpy(nodename2, node);
659 if (sa->sa_family != AF_INET && sa->sa_family != AF_INET6) {
663 if (sa->sa_family == AF_INET) {
664 salen =
sizeof(
struct sockaddr_in);
666 if (sa->sa_family == AF_INET6) {
667 salen =
sizeof(
struct sockaddr_in6);
670 if (getnameinfo(sa, salen,
671 nodename2,
sizeof(nodename2),
674 node_pos = nodelist_byname(nodename2, 0);
681 dot = strchr(nodename2,
'.');
685 node_pos = nodelist_byname(nodename2, 0);
694 if (getnameinfo(sa,
sizeof(*sa),
695 nodename2,
sizeof(nodename2),
696 NULL, 0, NI_NUMERICHOST))
699 node_pos = nodelist_byname(nodename2, 0);
708 freeifaddrs(ifa_list);
727 char *dbnodename = NULL;
728 struct addrinfo hints;
729 struct addrinfo *result = NULL, *rp = NULL;
731 res = sscanf(iter_key,
"nodelist.node.%u.%s", &node_pos, name_str);
738 if (strcmp(name_str,
"name") && strcmp(name_str,
"ring0_addr")) {
745 memset(&hints, 0,
sizeof(
struct addrinfo));
746 hints.ai_family = AF_UNSPEC;
747 hints.ai_socktype = SOCK_DGRAM;
749 hints.ai_protocol = IPPROTO_UDP;
751 if (getaddrinfo(dbnodename, NULL, &hints, &result)) {
755 for (rp = result; rp != NULL; rp = rp->ai_next) {
756 for (ifa = ifa_list; ifa; ifa = ifa->ifa_next) {
758 ipaddr_equal((
struct sockaddr_storage *)rp->ai_addr,
759 (
struct sockaddr_storage *)ifa->ifa_addr)) {
760 freeaddrinfo(result);
767 freeaddrinfo(result);
771 freeifaddrs(ifa_list);
793 if (strcmp(str,
"ipv4") == 0) {
796 if (strcmp(str,
"ipv6") == 0) {
799 if (strcmp(str,
"ipv6-4") == 0) {
802 if (strcmp(str,
"ipv4-6") == 0) {
811 static uint16_t generate_cluster_id (
const char *cluster_name)
816 for (i = 0; i < strlen(cluster_name); i++) {
818 value += cluster_name[i];
821 return (
value & 0xFFFF);
824 static int get_cluster_mcast_addr (
825 const char *cluster_name,
826 unsigned int linknumber,
831 char addr[INET6_ADDRSTRLEN + 1];
834 if (cluster_name == NULL) {
838 clusterid = generate_cluster_id(cluster_name) + linknumber;
839 memset (res, 0,
sizeof(*res));
841 switch (ip_version) {
844 snprintf(
addr,
sizeof(
addr),
"239.192.%d.%d", clusterid >> 8, clusterid % 0xFF);
848 snprintf(
addr,
sizeof(
addr),
"ff15::%x", clusterid);
862 static unsigned int generate_nodeid(
874 memcpy (&
nodeid, &totemip.addr, sizeof (
unsigned int));
876 #if __BYTE_ORDER == __LITTLE_ENDIAN
886 static int check_for_duplicate_nodeids(
888 const char **error_string)
892 const char *iter_key;
896 char *ring0_addr=NULL;
897 char *ring0_addr1=NULL;
898 unsigned int node_pos;
899 unsigned int node_pos1;
900 unsigned int last_node_pos = -1;
902 unsigned int nodeid1;
907 res = sscanf(iter_key,
"nodelist.node.%u.%s", &node_pos, tmp_key);
917 if (last_node_pos == node_pos) {
920 last_node_pos = node_pos;
943 while (((iter_key =
icmap_iter_next(subiter, NULL, NULL)) != NULL) && (node_pos1 < node_pos)) {
944 res = sscanf(iter_key,
"nodelist.node.%u.%s", &node_pos1, tmp_key);
945 if ((res != 2) || (node_pos1 >= node_pos)) {
949 if (strcmp(tmp_key,
"nodeid") != 0) {
968 snprintf (error_string_response,
sizeof(error_string_response),
969 "Nodeid %u%s%s%s appears twice in corosync.conf",
nodeid,
970 autogenerated?
"(autogenerated from ":
"",
971 autogenerated?ring0_addr:
"",
972 autogenerated?
")":
"");
974 *error_string = error_string_response;
995 for (interface = 0;
interface <
INTERFACE_MAX; interface++) {
1005 snprintf(runtime_key_name,
sizeof(runtime_key_name),
1006 "runtime.config.totem.interface.%d.knet_ping_timeout", interface);
1013 snprintf(runtime_key_name,
sizeof(runtime_key_name),
1014 "runtime.config.totem.interface.%d.knet_ping_interval", interface);
1029 int ring_no, set1_pos, set2_pos;
1032 memset(&empty_ip_address, 0,
sizeof(empty_ip_address));
1035 if (!set1[ring_no].configured && !set2[ring_no].configured) {
1039 for (set1_pos = 0; set1_pos < set1[ring_no].
member_count; set1_pos++) {
1040 for (set2_pos = 0; set2_pos < set2[ring_no].
member_count; set2_pos++) {
1045 if (memcmp(&set1[ring_no].member_list[set1_pos],
1046 &set2[ring_no].member_list[set2_pos],
1048 memset(&set1[ring_no].member_list[set1_pos], 0,
1050 memset(&set2[ring_no].member_list[set2_pos], 0,
1058 for (set1_pos = 0; set1_pos < set1[ring_no].
member_count; set1_pos++) {
1063 if (memcmp(&set1[ring_no].member_list[set1_pos], &empty_ip_address,
sizeof(empty_ip_address)) != 0) {
1065 "removing dynamic member %s for ring %u",
1072 if (!set2[ring_no].configured) {
1075 for (set2_pos = 0; set2_pos < set2[ring_no].
member_count; set2_pos++) {
1080 if (memcmp(&set2[ring_no].member_list[set2_pos], &empty_ip_address,
sizeof(empty_ip_address)) != 0) {
1082 "adding dynamic member %s for ring %u",
1102 int local_node_pos = find_local_node(0);
1146 char addr_buf[INET6_ADDRSTRLEN];
1154 "New config has different knet transport for link %d. Internal value was NOT changed.\n", i);
1166 strncpy(addr_buf, ip_str,
sizeof(addr_buf));
1167 addr_buf[
sizeof(addr_buf) - 1] =
'\0';
1169 "new config has different address for link %d (addr changed from %s to %s). Internal value was NOT changed.\n",
1179 log_printf(
LOGSYS_LEVEL_ERROR,
"To reconfigure an interface it must be deleted and recreated. A working interface needs to be available to corosync at all times");
1184 static int put_nodelist_members_to_config(
struct totem_config *
totem_config,
int reload,
const char **error_string)
1187 const char *iter_key, *iter_key2;
1189 unsigned int node_pos;
1192 char *node_addr_str;
1194 unsigned int linknumber = 0;
1196 int last_node_pos = -1;
1206 assert(new_interfaces != NULL);
1219 res = sscanf(iter_key,
"nodelist.node.%u.%s", &node_pos, tmp_key);
1224 if (node_pos == last_node_pos) {
1227 last_node_pos = node_pos;
1240 res = sscanf(iter_key2,
"nodelist.node.%u.ring%u%s", &node_pos, &linknumber, tmp_key2);
1241 if (res != 3 || strcmp(tmp_key2,
"_addr") != 0) {
1257 "Generated nodeid = 0x%x for %s",
nodeid, str);
1270 sprintf(error_string_response,
"failed to parse node address '%s'\n", node_addr_str);
1271 *error_string = error_string_response;
1276 free(node_addr_str);
1282 free(node_addr_str);
1300 free(new_interfaces);
1311 char *node_addr_str;
1312 unsigned int linknumber = 0;
1314 const char *iter_key;
1316 node_pos = find_local_node(1);
1317 if (node_pos > -1) {
1324 res = sscanf(iter_key,
"nodelist.node.%u.ring%u%s", &node_pos, &linknumber, tmp_key2);
1325 if (res != 3 || strcmp(tmp_key2,
"_addr") != 0) {
1335 free(node_addr_str);
1342 const char **error_string, uint64_t *warnings,
1346 unsigned int linknumber = 0;
1350 const char *iter_key;
1351 const char *member_iter_key;
1357 char *cluster_name = NULL;
1374 cluster_name = NULL;
1379 res = sscanf(iter_key,
"totem.interface.%[^.].%s", linknumber_key, tmp_key);
1389 linknumber = atoi(linknumber_key);
1394 snprintf (error_string_response,
sizeof(error_string_response),
1395 "parse error in config: interface ring number %u is bigger than allowed maximum %u\n",
1398 *error_string = error_string_response;
1414 sprintf(error_string_response,
"failed to parse bindnet address '%s'\n", str);
1415 *error_string = error_string_response;
1433 sprintf(error_string_response,
"failed to parse mcast address '%s'\n", str);
1434 *error_string = error_string_response;
1448 (void)get_cluster_mcast_addr (cluster_name,
1456 if (strcmp (str,
"yes") == 0) {
1492 if (strcmp(str,
"sctp") == 0) {
1495 else if (strcmp(str,
"udp") == 0) {
1499 *error_string =
"Unrecognised knet_transport. expected 'udp' or 'sctp'";
1539 while ((member_iter_key =
icmap_iter_next(member_iter, NULL, NULL)) != NULL) {
1554 sprintf(error_string_response,
"failed to parse node address '%s'\n", str);
1555 *error_string = error_string_response;
1578 const char **error_string,
1582 char *str, *ring0_addr_str;
1594 *error_string =
"Out of memory trying to allocate ethernet interface storage area";
1600 if (strcmp (str,
"udpu") == 0) {
1604 if (strcmp (str,
"udp") == 0) {
1608 if (strcmp (str,
"knet") == 0) {
1622 if (totem_get_crypto(
totem_config, error_string) != 0) {
1628 *error_string =
"totem.link_mode is too long";
1641 if (strcmp (str,
"yes") == 0) {
1668 free(ring0_addr_str);
1680 res = get_interface_params(
totem_config, error_string, warnings, 0);
1727 local_node_pos = find_local_node(1);
1728 if (local_node_pos != -1) {
1737 *error_string =
"Knet requires an explicit nodeid for the local node";
1757 if (put_nodelist_members_to_config(
totem_config, 0, error_string)) {
1779 const char **error_string)
1781 static char local_error_reason[512];
1782 char parse_error[512];
1783 static char addr_str_buf[INET6_ADDRSTRLEN];
1784 const char *error_reason = local_error_reason;
1787 int num_configured = 0;
1795 if (num_configured == 0) {
1796 error_reason =
"No interfaces defined";
1802 error_reason =
"No valid name found for local host";
1822 error_reason =
"No multicast address specified";
1827 error_reason =
"No multicast port specified";
1832 error_reason =
"Invalid TTL (should be 0..255)";
1837 error_reason =
"Can only set ttl on multicast transport types";
1841 error_reason =
"Invalid link priority (should be 0..255)";
1846 error_reason =
"Can only set link priority on knet transport type";
1853 error_reason =
"An IPV6 network requires that a node ID be specified.";
1859 error_reason =
"Multicast address family does not match bind address family";
1864 error_reason =
"mcastaddr is not a correct multicast address.";
1873 memcpy(addr_str_buf,
1875 sizeof(addr_str_buf));
1877 snprintf (local_error_reason,
sizeof(local_error_reason),
1878 "Nodes for link %d have different IP families "
1879 "(compared %s with %s)", i,
1889 error_reason =
"This totem parser can only parse version 2 configurations.";
1893 if (totem_volatile_config_validate(
totem_config, error_string) == -1) {
1897 if (check_for_duplicate_nodeids(
totem_config, error_string) == -1) {
1907 snprintf (local_error_reason,
sizeof(local_error_reason),
1908 "The Knet link mode \"%s\" specified is invalid. It must be active, passive or rr.\n",
totem_config->
link_mode);
1917 if (interface_max < num_configured) {
1918 snprintf (parse_error,
sizeof(parse_error),
1919 "%d is too many configured interfaces for non-Knet transport.",
1921 error_reason = parse_error;
1930 snprintf (parse_error,
sizeof(parse_error),
1931 "crypto_cipher & crypto_hash are only valid for the Knet transport.");
1932 error_reason = parse_error;
1949 snprintf (error_string_response,
sizeof(error_string_response),
1950 "parse error in config: %s\n", error_reason);
1951 *error_string = error_string_response;
1956 static int read_keyfile (
1957 const char *key_location,
1959 const char **error_string)
1964 char error_str[100];
1965 const char *error_ptr;
1967 fd = open (key_location, O_RDONLY);
1969 error_ptr = qb_strerror_r(errno, error_str,
sizeof(error_str));
1970 snprintf (error_string_response,
sizeof(error_string_response),
1971 "Could not open %s: %s\n",
1972 key_location, error_ptr);
1977 saved_errno = errno;
1981 error_ptr = qb_strerror_r (saved_errno, error_str,
sizeof(error_str));
1982 snprintf (error_string_response,
sizeof(error_string_response),
1983 "Could not read %s: %s\n",
1984 key_location, error_ptr);
1989 snprintf (error_string_response,
sizeof(error_string_response),
1990 "Could only read %d bits of minimum %u bits from %s.\n",
2000 *error_string = error_string_response;
2006 const char **error_string)
2009 char *key_location = NULL;
2023 res = read_keyfile(key_location,
totem_config, error_string);
2032 sprintf(error_string_response,
"key is too long");
2036 sprintf(error_string_response,
"key is too short");
2043 sprintf(error_string_response,
"can't load private key");
2059 *error_string = error_string_response;
2073 if (token_warning_ms < totem_config->token_retransmit_timeout)
2075 "The token warning interval (%d ms) is less than the token retransmit timeout (%d ms) "
2076 "which can lead to spurious token warnings. Consider increasing the token_warning parameter.",
2089 "seqno unchanged const (%d rotations) Maximum network MTU %d",
2092 "window size per rotation (%d messages) maximum messages per rotation (%d messages)",
2100 static void totem_change_notify(
2102 const char *key_name,
2110 const char *deleted_key = NULL;
2111 const char *error_string;
2126 if (!
param && strcmp(key_name,
"totem.token_coefficient") != 0)
2134 deleted_key = key_name;
2144 totem_volatile_config_read (
totem_config, deleted_key);
2147 if (totem_volatile_config_validate(
totem_config, &error_string) == -1) {
2156 static void totem_reload_notify(
2158 const char *key_name,
2164 const char *error_string;
2168 if (*(uint8_t *)new_val.
data == 0) {
2174 get_interface_params(
totem_config, &error_string, &warnings, 1);
2175 if (put_nodelist_members_to_config (
totem_config, 1, &error_string)) {
2184 if (totem_volatile_config_validate(
totem_config, &error_string) == -1) {
2193 (void)find_local_node(0);
2212 totem_change_notify,
2218 totem_reload_notify,