corosync  3.0.1
exec/cfg.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2005-2006 MontaVista Software, Inc.
3  * Copyright (c) 2006-2018 Red Hat, Inc.
4  *
5  * All rights reserved.
6  *
7  * Author: Steven Dake (sdake@redhat.com)
8  *
9  * This software licensed under BSD license, the text of which follows:
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions are met:
13  *
14  * - Redistributions of source code must retain the above copyright notice,
15  * this list of conditions and the following disclaimer.
16  * - Redistributions in binary form must reproduce the above copyright notice,
17  * this list of conditions and the following disclaimer in the documentation
18  * and/or other materials provided with the distribution.
19  * - Neither the name of the MontaVista Software, Inc. nor the names of its
20  * contributors may be used to endorse or promote products derived from this
21  * software without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
33  * THE POSSIBILITY OF SUCH DAMAGE.
34  */
35 
36 #include <config.h>
37 
38 #include <sys/types.h>
39 #include <sys/uio.h>
40 #include <sys/socket.h>
41 #include <sys/un.h>
42 #include <netinet/in.h>
43 #include <arpa/inet.h>
44 #include <unistd.h>
45 #include <fcntl.h>
46 #include <stdlib.h>
47 #include <stdio.h>
48 #include <limits.h>
49 #include <errno.h>
50 #include <string.h>
51 #include <assert.h>
52 
53 #include <corosync/corotypes.h>
54 #include <qb/qbipc_common.h>
55 #include <corosync/cfg.h>
56 #include <qb/qblist.h>
57 #include <corosync/mar_gen.h>
58 #include <corosync/totem/totemip.h>
59 #include <corosync/totem/totem.h>
60 #include <corosync/ipc_cfg.h>
61 #include <corosync/logsys.h>
62 #include <corosync/coroapi.h>
63 #include <corosync/icmap.h>
64 #include <corosync/corodefs.h>
65 
66 #include "service.h"
67 #include "main.h"
68 
69 LOGSYS_DECLARE_SUBSYS ("CFG");
70 
76 };
77 
78 #define DEFAULT_SHUTDOWN_TIMEOUT 5
79 
80 static struct qb_list_head trackers_list;
81 
82 /*
83  * Variables controlling a requested shutdown
84  */
85 static corosync_timer_handle_t shutdown_timer;
86 static struct cfg_info *shutdown_con;
87 static uint32_t shutdown_flags;
88 static int shutdown_yes;
89 static int shutdown_no;
90 static int shutdown_expected;
91 
92 struct cfg_info
93 {
94  struct qb_list_head list;
95  void *conn;
96  void *tracker_conn;
98 };
99 
100 static void cfg_confchg_fn (
101  enum totem_configuration_type configuration_type,
102  const unsigned int *member_list, size_t member_list_entries,
103  const unsigned int *left_list, size_t left_list_entries,
104  const unsigned int *joined_list, size_t joined_list_entries,
105  const struct memb_ring_id *ring_id);
106 
107 static char *cfg_exec_init_fn (struct corosync_api_v1 *corosync_api_v1);
108 
109 static struct corosync_api_v1 *api;
110 
111 static int cfg_lib_init_fn (void *conn);
112 
113 static int cfg_lib_exit_fn (void *conn);
114 
115 static void message_handler_req_exec_cfg_ringreenable (
116  const void *message,
117  unsigned int nodeid);
118 
119 static void message_handler_req_exec_cfg_killnode (
120  const void *message,
121  unsigned int nodeid);
122 
123 static void message_handler_req_exec_cfg_shutdown (
124  const void *message,
125  unsigned int nodeid);
126 
127 static void message_handler_req_exec_cfg_reload_config (
128  const void *message,
129  unsigned int nodeid);
130 
131 static void exec_cfg_killnode_endian_convert (void *msg);
132 
133 static void message_handler_req_lib_cfg_ringstatusget (
134  void *conn,
135  const void *msg);
136 
137 static void message_handler_req_lib_cfg_ringreenable (
138  void *conn,
139  const void *msg);
140 
141 static void message_handler_req_lib_cfg_killnode (
142  void *conn,
143  const void *msg);
144 
145 static void message_handler_req_lib_cfg_tryshutdown (
146  void *conn,
147  const void *msg);
148 
149 static void message_handler_req_lib_cfg_replytoshutdown (
150  void *conn,
151  const void *msg);
152 
153 static void message_handler_req_lib_cfg_get_node_addrs (
154  void *conn,
155  const void *msg);
156 
157 static void message_handler_req_lib_cfg_local_get (
158  void *conn,
159  const void *msg);
160 
161 static void message_handler_req_lib_cfg_reload_config (
162  void *conn,
163  const void *msg);
164 
165 static void message_handler_req_lib_cfg_reopen_log_files (
166  void *conn,
167  const void *msg);
168 
169 /*
170  * Service Handler Definition
171  */
172 static struct corosync_lib_handler cfg_lib_engine[] =
173 {
174  { /* 0 */
175  .lib_handler_fn = message_handler_req_lib_cfg_ringstatusget,
176  .flow_control = CS_LIB_FLOW_CONTROL_REQUIRED
177  },
178  { /* 1 */
179  .lib_handler_fn = message_handler_req_lib_cfg_ringreenable,
180  .flow_control = CS_LIB_FLOW_CONTROL_REQUIRED
181  },
182  { /* 2 */
183  .lib_handler_fn = message_handler_req_lib_cfg_killnode,
184  .flow_control = CS_LIB_FLOW_CONTROL_REQUIRED
185  },
186  { /* 3 */
187  .lib_handler_fn = message_handler_req_lib_cfg_tryshutdown,
188  .flow_control = CS_LIB_FLOW_CONTROL_REQUIRED
189  },
190  { /* 4 */
191  .lib_handler_fn = message_handler_req_lib_cfg_replytoshutdown,
192  .flow_control = CS_LIB_FLOW_CONTROL_REQUIRED
193  },
194  { /* 5 */
195  .lib_handler_fn = message_handler_req_lib_cfg_get_node_addrs,
196  .flow_control = CS_LIB_FLOW_CONTROL_NOT_REQUIRED
197  },
198  { /* 6 */
199  .lib_handler_fn = message_handler_req_lib_cfg_local_get,
200  .flow_control = CS_LIB_FLOW_CONTROL_NOT_REQUIRED
201  },
202  { /* 7 */
203  .lib_handler_fn = message_handler_req_lib_cfg_reload_config,
204  .flow_control = CS_LIB_FLOW_CONTROL_REQUIRED
205  },
206  { /* 8 */
207  .lib_handler_fn = message_handler_req_lib_cfg_reopen_log_files,
208  .flow_control = CS_LIB_FLOW_CONTROL_NOT_REQUIRED
209  }
210 };
211 
212 static struct corosync_exec_handler cfg_exec_engine[] =
213 {
214  { /* 0 */
215  .exec_handler_fn = message_handler_req_exec_cfg_ringreenable,
216  },
217  { /* 1 */
218  .exec_handler_fn = message_handler_req_exec_cfg_killnode,
219  .exec_endian_convert_fn = exec_cfg_killnode_endian_convert
220  },
221  { /* 2 */
222  .exec_handler_fn = message_handler_req_exec_cfg_shutdown,
223  },
224  { /* 3 */
225  .exec_handler_fn = message_handler_req_exec_cfg_reload_config,
226  }
227 };
228 
229 /*
230  * Exports the interface for the service
231  */
233  .name = "corosync configuration service",
234  .id = CFG_SERVICE,
235  .priority = 1,
236  .private_data_size = sizeof(struct cfg_info),
237  .flow_control = CS_LIB_FLOW_CONTROL_NOT_REQUIRED,
238  .allow_inquorate = CS_LIB_ALLOW_INQUORATE,
239  .lib_init_fn = cfg_lib_init_fn,
240  .lib_exit_fn = cfg_lib_exit_fn,
241  .lib_engine = cfg_lib_engine,
242  .lib_engine_count = sizeof (cfg_lib_engine) / sizeof (struct corosync_lib_handler),
243  .exec_init_fn = cfg_exec_init_fn,
244  .exec_engine = cfg_exec_engine,
245  .exec_engine_count = sizeof (cfg_exec_engine) / sizeof (struct corosync_exec_handler),
246  .confchg_fn = cfg_confchg_fn
247 };
248 
250 {
251  return (&cfg_service_engine);
252 }
253 
255  struct qb_ipc_request_header header __attribute__((aligned(8)));
256  mar_message_source_t source __attribute__((aligned(8)));
257 };
258 
260  struct qb_ipc_request_header header __attribute__((aligned(8)));
261  mar_message_source_t source __attribute__((aligned(8)));
262 };
263 
265  struct qb_ipc_request_header header __attribute__((aligned(8)));
266  mar_uint32_t nodeid __attribute__((aligned(8)));
267  mar_name_t reason __attribute__((aligned(8)));
268 };
269 
271  struct qb_ipc_request_header header __attribute__((aligned(8)));
272 };
273 
274 /* IMPL */
275 
276 static char *cfg_exec_init_fn (
277  struct corosync_api_v1 *corosync_api_v1)
278 {
279  api = corosync_api_v1;
280 
281  qb_list_init(&trackers_list);
282  return (NULL);
283 }
284 
285 static void cfg_confchg_fn (
286  enum totem_configuration_type configuration_type,
287  const unsigned int *member_list, size_t member_list_entries,
288  const unsigned int *left_list, size_t left_list_entries,
289  const unsigned int *joined_list, size_t joined_list_entries,
290  const struct memb_ring_id *ring_id)
291 {
292 }
293 
294 /*
295  * Tell other nodes we are shutting down
296  */
297 static int send_shutdown(void)
298 {
299  struct req_exec_cfg_shutdown req_exec_cfg_shutdown;
300  struct iovec iovec;
301 
302  ENTER();
303  req_exec_cfg_shutdown.header.size =
304  sizeof (struct req_exec_cfg_shutdown);
305  req_exec_cfg_shutdown.header.id = SERVICE_ID_MAKE (CFG_SERVICE,
307 
308  iovec.iov_base = (char *)&req_exec_cfg_shutdown;
309  iovec.iov_len = sizeof (struct req_exec_cfg_shutdown);
310 
311  assert (api->totem_mcast (&iovec, 1, TOTEM_SAFE) == 0);
312 
313  LEAVE();
314  return 0;
315 }
316 
317 static void send_test_shutdown(void *only_conn, void *exclude_conn, int status)
318 {
319  struct res_lib_cfg_testshutdown res_lib_cfg_testshutdown;
320  struct qb_list_head *iter;
321 
322  ENTER();
323  res_lib_cfg_testshutdown.header.size = sizeof(struct res_lib_cfg_testshutdown);
324  res_lib_cfg_testshutdown.header.id = MESSAGE_RES_CFG_TESTSHUTDOWN;
325  res_lib_cfg_testshutdown.header.error = status;
326  res_lib_cfg_testshutdown.flags = shutdown_flags;
327 
328  if (only_conn) {
329  TRACE1("sending testshutdown to only %p", only_conn);
330  api->ipc_dispatch_send(only_conn, &res_lib_cfg_testshutdown,
331  sizeof(res_lib_cfg_testshutdown));
332  } else {
333  qb_list_for_each(iter, &trackers_list) {
334  struct cfg_info *ci = qb_list_entry(iter, struct cfg_info, list);
335 
336  if (ci->conn != exclude_conn) {
337  TRACE1("sending testshutdown to %p", ci->tracker_conn);
338  api->ipc_dispatch_send(ci->tracker_conn, &res_lib_cfg_testshutdown,
339  sizeof(res_lib_cfg_testshutdown));
340  }
341  }
342  }
343  LEAVE();
344 }
345 
346 static void check_shutdown_status(void)
347 {
348  ENTER();
349 
350  /*
351  * Shutdown client might have gone away
352  */
353  if (!shutdown_con) {
354  LEAVE();
355  return;
356  }
357 
358  /*
359  * All replies safely gathered in ?
360  */
361  if (shutdown_yes + shutdown_no >= shutdown_expected) {
362  struct res_lib_cfg_tryshutdown res_lib_cfg_tryshutdown;
363 
364  api->timer_delete(shutdown_timer);
365 
366  if (shutdown_yes >= shutdown_expected ||
367  shutdown_flags == CFG_SHUTDOWN_FLAG_REGARDLESS) {
368  TRACE1("shutdown confirmed");
369 
370  res_lib_cfg_tryshutdown.header.size = sizeof(struct res_lib_cfg_tryshutdown);
371  res_lib_cfg_tryshutdown.header.id = MESSAGE_RES_CFG_TRYSHUTDOWN;
372  res_lib_cfg_tryshutdown.header.error = CS_OK;
373 
374  /*
375  * Tell originator that shutdown was confirmed
376  */
377  api->ipc_response_send(shutdown_con->conn, &res_lib_cfg_tryshutdown,
378  sizeof(res_lib_cfg_tryshutdown));
379  shutdown_con = NULL;
380 
381  /*
382  * Tell other nodes we are going down
383  */
384  send_shutdown();
385 
386  }
387  else {
388 
389  TRACE1("shutdown cancelled");
390  res_lib_cfg_tryshutdown.header.size = sizeof(struct res_lib_cfg_tryshutdown);
391  res_lib_cfg_tryshutdown.header.id = MESSAGE_RES_CFG_TRYSHUTDOWN;
392  res_lib_cfg_tryshutdown.header.error = CS_ERR_BUSY;
393 
394  /*
395  * Tell originator that shutdown was cancelled
396  */
397  api->ipc_response_send(shutdown_con->conn, &res_lib_cfg_tryshutdown,
398  sizeof(res_lib_cfg_tryshutdown));
399  shutdown_con = NULL;
400  }
401 
402  log_printf(LOGSYS_LEVEL_DEBUG, "shutdown decision is: (yes count: %d, no count: %d) flags=%x",
403  shutdown_yes, shutdown_no, shutdown_flags);
404  }
405  LEAVE();
406 }
407 
408 
409 /*
410  * Not all nodes responded to the shutdown (in time)
411  */
412 static void shutdown_timer_fn(void *arg)
413 {
414  ENTER();
415 
416  /*
417  * Mark undecideds as "NO"
418  */
419  shutdown_no = shutdown_expected;
420  check_shutdown_status();
421 
422  send_test_shutdown(NULL, NULL, CS_ERR_TIMEOUT);
423  LEAVE();
424 }
425 
426 static void remove_ci_from_shutdown(struct cfg_info *ci)
427 {
428  ENTER();
429 
430  /*
431  * If the controlling shutdown process has quit, then cancel the
432  * shutdown session
433  */
434  if (ci == shutdown_con) {
435  shutdown_con = NULL;
436  api->timer_delete(shutdown_timer);
437  }
438 
439  if (!qb_list_empty(&ci->list)) {
440  qb_list_del(&ci->list);
441  qb_list_init(&ci->list);
442 
443  /*
444  * Remove our option
445  */
446  if (shutdown_con) {
448  shutdown_yes--;
450  shutdown_no--;
451  }
452 
453  /*
454  * If we are leaving, then that's an implicit YES to shutdown
455  */
457  shutdown_yes++;
458 
459  check_shutdown_status();
460  }
461  LEAVE();
462 }
463 
464 
465 int cfg_lib_exit_fn (void *conn)
466 {
467  struct cfg_info *ci = (struct cfg_info *)api->ipc_private_data_get (conn);
468 
469  ENTER();
470  remove_ci_from_shutdown(ci);
471  LEAVE();
472  return (0);
473 }
474 
475 static int cfg_lib_init_fn (void *conn)
476 {
477  struct cfg_info *ci = (struct cfg_info *)api->ipc_private_data_get (conn);
478 
479  ENTER();
480  qb_list_init(&ci->list);
481  LEAVE();
482 
483  return (0);
484 }
485 
486 /*
487  * Executive message handlers
488  */
489 static void message_handler_req_exec_cfg_ringreenable (
490  const void *message,
491  unsigned int nodeid)
492 {
493  ENTER();
494 
495  LEAVE();
496 }
497 
498 static void exec_cfg_killnode_endian_convert (void *msg)
499 {
501  (struct req_exec_cfg_killnode *)msg;
502  ENTER();
503 
504  swab_mar_name_t(&req_exec_cfg_killnode->reason);
505  LEAVE();
506 }
507 
508 
509 static void message_handler_req_exec_cfg_killnode (
510  const void *message,
511  unsigned int nodeid)
512 {
513  const struct req_exec_cfg_killnode *req_exec_cfg_killnode = message;
514  cs_name_t reason;
515 
516  ENTER();
517  log_printf(LOGSYS_LEVEL_DEBUG, "request to kill node %d(us=%d)",
518  req_exec_cfg_killnode->nodeid, api->totem_nodeid_get());
519  if (req_exec_cfg_killnode->nodeid == api->totem_nodeid_get()) {
520  marshall_from_mar_name_t(&reason, &req_exec_cfg_killnode->reason);
521  log_printf(LOGSYS_LEVEL_NOTICE, "Killed by node %d: %s",
522  nodeid, reason.value);
524  }
525  LEAVE();
526 }
527 
528 /*
529  * Self shutdown
530  */
531 static void message_handler_req_exec_cfg_shutdown (
532  const void *message,
533  unsigned int nodeid)
534 {
535  ENTER();
536 
537  log_printf(LOGSYS_LEVEL_NOTICE, "Node %d was shut down by sysadmin", nodeid);
538  if (nodeid == api->totem_nodeid_get()) {
539  api->shutdown_request();
540  }
541  LEAVE();
542 }
543 
544 /* strcmp replacement that can handle NULLs */
545 static int nullcheck_strcmp(const char* left, const char *right)
546 {
547  if (!left && right)
548  return -1;
549  if (left && !right)
550  return 1;
551 
552  if (!left && !right)
553  return 0;
554 
555  return strcmp(left, right);
556 }
557 
558 /*
559  * If a key has changed value in the new file, then warn the user and remove it from the temp_map
560  */
561 static void delete_and_notify_if_changed(icmap_map_t temp_map, const char *key_name)
562 {
563  if (!(icmap_key_value_eq(temp_map, key_name, icmap_get_global_map(), key_name))) {
564  if (icmap_delete_r(temp_map, key_name) == CS_OK) {
565  log_printf(LOGSYS_LEVEL_NOTICE, "Modified entry '%s' in corosync.conf cannot be changed at run-time", key_name);
566  }
567  }
568 }
569 /*
570  * Remove any keys from the new config file that in the new corosync.conf but that
571  * cannot be changed at run time. A log message will be issued for each
572  * entry that the user wants to change but they cannot.
573  *
574  * Add more here as needed.
575  */
576 static void remove_ro_entries(icmap_map_t temp_map)
577 {
578  delete_and_notify_if_changed(temp_map, "totem.secauth");
579  delete_and_notify_if_changed(temp_map, "totem.crypto_hash");
580  delete_and_notify_if_changed(temp_map, "totem.crypto_cipher");
581  delete_and_notify_if_changed(temp_map, "totem.version");
582  delete_and_notify_if_changed(temp_map, "totem.threads");
583  delete_and_notify_if_changed(temp_map, "totem.ip_version");
584  delete_and_notify_if_changed(temp_map, "totem.rrp_mode");
585  delete_and_notify_if_changed(temp_map, "totem.netmtu");
586  delete_and_notify_if_changed(temp_map, "totem.interface.ringnumber");
587  delete_and_notify_if_changed(temp_map, "totem.interface.bindnetaddr");
588  delete_and_notify_if_changed(temp_map, "totem.interface.mcastaddr");
589  delete_and_notify_if_changed(temp_map, "totem.interface.broadcast");
590  delete_and_notify_if_changed(temp_map, "totem.interface.mcastport");
591  delete_and_notify_if_changed(temp_map, "totem.interface.ttl");
592  delete_and_notify_if_changed(temp_map, "totem.vsftype");
593  delete_and_notify_if_changed(temp_map, "totem.transport");
594  delete_and_notify_if_changed(temp_map, "totem.cluster_name");
595  delete_and_notify_if_changed(temp_map, "quorum.provider");
596  delete_and_notify_if_changed(temp_map, "system.move_to_root_cgroup");
597  delete_and_notify_if_changed(temp_map, "system.sched_rr");
598  delete_and_notify_if_changed(temp_map, "system.priority");
599  delete_and_notify_if_changed(temp_map, "system.qb_ipc_type");
600  delete_and_notify_if_changed(temp_map, "system.state_dir");
601 }
602 
603 /*
604  * Remove entries that exist in the global map, but not in the temp_map, this will
605  * cause delete notifications to be sent to any listeners.
606  *
607  * NOTE: This routine depends entirely on the keys returned by the iterators
608  * being in alpha-sorted order.
609  */
610 static void remove_deleted_entries(icmap_map_t temp_map, const char *prefix)
611 {
612  icmap_iter_t old_iter;
613  icmap_iter_t new_iter;
614  const char *old_key, *new_key;
615  int ret;
616 
617  old_iter = icmap_iter_init(prefix);
618  new_iter = icmap_iter_init_r(temp_map, prefix);
619 
620  old_key = icmap_iter_next(old_iter, NULL, NULL);
621  new_key = icmap_iter_next(new_iter, NULL, NULL);
622 
623  while (old_key || new_key) {
624  ret = nullcheck_strcmp(old_key, new_key);
625  if ((ret < 0 && old_key) || !new_key) {
626  /*
627  * new_key is greater, a line (or more) has been deleted
628  * Continue until old is >= new
629  */
630  do {
631  /* Remove it from icmap & send notifications */
632  icmap_delete(old_key);
633 
634  old_key = icmap_iter_next(old_iter, NULL, NULL);
635  ret = nullcheck_strcmp(old_key, new_key);
636  } while (ret < 0 && old_key);
637  }
638  else if ((ret > 0 && new_key) || !old_key) {
639  /*
640  * old_key is greater, a line (or more) has been added
641  * Continue until new is >= old
642  *
643  * we don't need to do anything special with this like tell
644  * icmap. That will happen when we copy the values over
645  */
646  do {
647  new_key = icmap_iter_next(new_iter, NULL, NULL);
648  ret = nullcheck_strcmp(old_key, new_key);
649  } while (ret > 0 && new_key);
650  }
651  if (ret == 0) {
652  new_key = icmap_iter_next(new_iter, NULL, NULL);
653  old_key = icmap_iter_next(old_iter, NULL, NULL);
654  }
655  }
656  icmap_iter_finalize(new_iter);
657  icmap_iter_finalize(old_iter);
658 }
659 
660 /*
661  * Reload configuration file
662  */
663 static void message_handler_req_exec_cfg_reload_config (
664  const void *message,
665  unsigned int nodeid)
666 {
668  struct res_lib_cfg_reload_config res_lib_cfg_reload_config;
669  icmap_map_t temp_map;
670  const char *error_string;
671  int res = CS_OK;
672 
673  ENTER();
674 
675  log_printf(LOGSYS_LEVEL_NOTICE, "Config reload requested by node %d", nodeid);
676 
677  /*
678  * Set up a new hashtable as a staging area.
679  */
680  if ((res = icmap_init_r(&temp_map)) != CS_OK) {
681  log_printf(LOGSYS_LEVEL_ERROR, "Unable to create temporary icmap. config file reload cancelled\n");
682  goto reload_fini;
683  }
684 
685  /*
686  * Load new config into the temporary map
687  */
688  res = coroparse_configparse(temp_map, &error_string);
689  if (res == -1) {
690  log_printf (LOGSYS_LEVEL_ERROR, "Unable to reload config file: %s", error_string);
691  res = CS_ERR_LIBRARY;
692  goto reload_return;
693  }
694 
695  /* Tell interested listeners that we have started a reload */
696  icmap_set_uint8("config.reload_in_progress", 1);
697 
698  /* Detect deleted entries and remove them from the main icmap hashtable */
699  remove_deleted_entries(temp_map, "logging.");
700  remove_deleted_entries(temp_map, "totem.");
701  remove_deleted_entries(temp_map, "nodelist.");
702  remove_deleted_entries(temp_map, "quorum.");
703  remove_deleted_entries(temp_map, "uidgid.config.");
704 
705  /* Remove entries that cannot be changed */
706  remove_ro_entries(temp_map);
707 
708  /*
709  * Copy new keys into live config.
710  * If this fails we will have a partially loaded config because some keys (above) might
711  * have been reset to defaults - I'm not sure what to do here, we might have to quit.
712  */
713  if ( (res = icmap_copy_map(icmap_get_global_map(), temp_map)) != CS_OK) {
714  log_printf (LOGSYS_LEVEL_ERROR, "Error making new config live. cmap database may be inconsistent\n");
715  }
716 
717  /* All done - let clients know */
718  icmap_set_uint8("config.reload_in_progress", 0);
719 
720 reload_fini:
721  /* Finished with the temporary storage */
722  icmap_fini_r(temp_map);
723 
724 reload_return:
725  /* All done, return result to the caller if it was on this system */
726  if (nodeid == api->totem_nodeid_get()) {
727  res_lib_cfg_reload_config.header.size = sizeof(res_lib_cfg_reload_config);
728  res_lib_cfg_reload_config.header.id = MESSAGE_RES_CFG_RELOAD_CONFIG;
729  res_lib_cfg_reload_config.header.error = res;
730  api->ipc_response_send(req_exec_cfg_reload_config->source.conn,
731  &res_lib_cfg_reload_config,
732  sizeof(res_lib_cfg_reload_config));
733  api->ipc_refcnt_dec(req_exec_cfg_reload_config->source.conn);;
734  }
735 
736  LEAVE();
737 }
738 
739 /*
740  * Library Interface Implementation
741  */
742 static void message_handler_req_lib_cfg_ringstatusget (
743  void *conn,
744  const void *msg)
745 {
746  struct res_lib_cfg_ringstatusget res_lib_cfg_ringstatusget;
747  struct totem_ip_address interfaces[INTERFACE_MAX];
748  unsigned int iface_count;
749  char **status;
750  const char *totem_ip_string;
751  char ifname[CFG_INTERFACE_NAME_MAX_LEN];
752  unsigned int iface_ids[INTERFACE_MAX];
753  unsigned int i;
754  cs_error_t res = CS_OK;
755 
756  ENTER();
757 
758  res_lib_cfg_ringstatusget.header.id = MESSAGE_RES_CFG_RINGSTATUSGET;
759  res_lib_cfg_ringstatusget.header.size = sizeof (struct res_lib_cfg_ringstatusget);
760 
761  api->totem_ifaces_get (
762  api->totem_nodeid_get(),
763  iface_ids,
764  interfaces,
766  &status,
767  &iface_count);
768 
769  assert(iface_count <= CFG_MAX_INTERFACES);
770 
771  res_lib_cfg_ringstatusget.interface_count = iface_count;
772 
773  for (i = 0; i < iface_count; i++) {
774  totem_ip_string
775  = (const char *)api->totem_ip_print (&interfaces[i]);
776 
777  if (!totem_ip_string) {
778  totem_ip_string="";
779  }
780 
781  /* Allow for i/f number at the start */
782  if (strlen(totem_ip_string) >= CFG_INTERFACE_NAME_MAX_LEN-3) {
783  log_printf(LOGSYS_LEVEL_ERROR, "String representation of interface %u is too long", i);
784  res = CS_ERR_NAME_TOO_LONG;
785  goto send_response;
786  }
787  snprintf(ifname, sizeof(ifname), "%d %s", iface_ids[i], totem_ip_string);
788 
789  if (strlen(status[i]) >= CFG_INTERFACE_STATUS_MAX_LEN) {
790  log_printf(LOGSYS_LEVEL_ERROR, "Status string for interface %u is too long", i);
791  res = CS_ERR_NAME_TOO_LONG;
792  goto send_response;
793  }
794 
795  strcpy ((char *)&res_lib_cfg_ringstatusget.interface_status[i],
796  status[i]);
797  strcpy ((char *)&res_lib_cfg_ringstatusget.interface_name[i],
798  ifname);
799  }
800 
801 send_response:
802  res_lib_cfg_ringstatusget.header.error = res;
803  api->ipc_response_send (
804  conn,
805  &res_lib_cfg_ringstatusget,
806  sizeof (struct res_lib_cfg_ringstatusget));
807 
808  LEAVE();
809 }
810 
811 static void message_handler_req_lib_cfg_ringreenable (
812  void *conn,
813  const void *msg)
814 {
815  struct res_lib_cfg_ringreenable res_lib_cfg_ringreenable;
816  ENTER();
817 
818  res_lib_cfg_ringreenable.header.id = MESSAGE_RES_CFG_RINGREENABLE;
819  res_lib_cfg_ringreenable.header.size = sizeof (struct res_lib_cfg_ringreenable);
820  res_lib_cfg_ringreenable.header.error = CS_ERR_NOT_SUPPORTED;
821  api->ipc_response_send (
822  conn, &res_lib_cfg_ringreenable,
823  sizeof (struct res_lib_cfg_ringreenable));
824 
825  LEAVE();
826 }
827 
828 static void message_handler_req_lib_cfg_killnode (
829  void *conn,
830  const void *msg)
831 {
832  const struct req_lib_cfg_killnode *req_lib_cfg_killnode = msg;
833  struct res_lib_cfg_killnode res_lib_cfg_killnode;
834  struct req_exec_cfg_killnode req_exec_cfg_killnode;
835  struct iovec iovec;
836 
837  ENTER();
838  req_exec_cfg_killnode.header.size =
839  sizeof (struct req_exec_cfg_killnode);
840  req_exec_cfg_killnode.header.id = SERVICE_ID_MAKE (CFG_SERVICE,
842  req_exec_cfg_killnode.nodeid = req_lib_cfg_killnode->nodeid;
843  marshall_to_mar_name_t(&req_exec_cfg_killnode.reason, &req_lib_cfg_killnode->reason);
844 
845  iovec.iov_base = (char *)&req_exec_cfg_killnode;
846  iovec.iov_len = sizeof (struct req_exec_cfg_killnode);
847 
848  (void)api->totem_mcast (&iovec, 1, TOTEM_SAFE);
849 
850  res_lib_cfg_killnode.header.size = sizeof(struct res_lib_cfg_killnode);
851  res_lib_cfg_killnode.header.id = MESSAGE_RES_CFG_KILLNODE;
852  res_lib_cfg_killnode.header.error = CS_OK;
853 
854  api->ipc_response_send(conn, &res_lib_cfg_killnode,
855  sizeof(res_lib_cfg_killnode));
856 
857  LEAVE();
858 }
859 
860 
861 static void message_handler_req_lib_cfg_tryshutdown (
862  void *conn,
863  const void *msg)
864 {
865  struct cfg_info *ci = (struct cfg_info *)api->ipc_private_data_get (conn);
867  struct qb_list_head *iter;
868 
869  ENTER();
870 
871  if (req_lib_cfg_tryshutdown->flags == CFG_SHUTDOWN_FLAG_IMMEDIATE) {
872  struct res_lib_cfg_tryshutdown res_lib_cfg_tryshutdown;
873 
874  /*
875  * Tell other nodes
876  */
877  send_shutdown();
878 
879  res_lib_cfg_tryshutdown.header.size = sizeof(struct res_lib_cfg_tryshutdown);
880  res_lib_cfg_tryshutdown.header.id = MESSAGE_RES_CFG_TRYSHUTDOWN;
881  res_lib_cfg_tryshutdown.header.error = CS_OK;
882  api->ipc_response_send(conn, &res_lib_cfg_tryshutdown,
883  sizeof(res_lib_cfg_tryshutdown));
884 
885  LEAVE();
886  return;
887  }
888 
889  /*
890  * Shutdown in progress, return an error
891  */
892  if (shutdown_con) {
893  struct res_lib_cfg_tryshutdown res_lib_cfg_tryshutdown;
894 
895  res_lib_cfg_tryshutdown.header.size = sizeof(struct res_lib_cfg_tryshutdown);
896  res_lib_cfg_tryshutdown.header.id = MESSAGE_RES_CFG_TRYSHUTDOWN;
897  res_lib_cfg_tryshutdown.header.error = CS_ERR_EXIST;
898 
899  api->ipc_response_send(conn, &res_lib_cfg_tryshutdown,
900  sizeof(res_lib_cfg_tryshutdown));
901 
902 
903  LEAVE();
904 
905  return;
906  }
907 
908  ci->conn = conn;
909  shutdown_con = (struct cfg_info *)api->ipc_private_data_get (conn);
910  shutdown_flags = req_lib_cfg_tryshutdown->flags;
911  shutdown_yes = 0;
912  shutdown_no = 0;
913 
914  /*
915  * Count the number of listeners
916  */
917  shutdown_expected = 0;
918 
919  qb_list_for_each(iter, &trackers_list) {
920  struct cfg_info *testci = qb_list_entry(iter, struct cfg_info, list);
921  /*
922  * It is assumed that we will allow shutdown
923  */
924  if (testci != ci) {
926  shutdown_expected++;
927  }
928  }
929 
930  /*
931  * If no-one is listening for events then we can just go down now
932  */
933  if (shutdown_expected == 0) {
934  struct res_lib_cfg_tryshutdown res_lib_cfg_tryshutdown;
935 
936  res_lib_cfg_tryshutdown.header.size = sizeof(struct res_lib_cfg_tryshutdown);
937  res_lib_cfg_tryshutdown.header.id = MESSAGE_RES_CFG_TRYSHUTDOWN;
938  res_lib_cfg_tryshutdown.header.error = CS_OK;
939 
940  /*
941  * Tell originator that shutdown was confirmed
942  */
943  api->ipc_response_send(conn, &res_lib_cfg_tryshutdown,
944  sizeof(res_lib_cfg_tryshutdown));
945 
946  send_shutdown();
947  LEAVE();
948  return;
949  }
950  else {
951  unsigned int shutdown_timeout = DEFAULT_SHUTDOWN_TIMEOUT;
952 
953  /*
954  * Look for a shutdown timeout in configuration map
955  */
956  icmap_get_uint32("cfg.shutdown_timeout", &shutdown_timeout);
957 
958  /*
959  * Start the timer. If we don't get a full set of replies before this goes
960  * off we'll cancel the shutdown
961  */
962  api->timer_add_duration((unsigned long long)shutdown_timeout*1000000000, NULL,
963  shutdown_timer_fn, &shutdown_timer);
964 
965  /*
966  * Tell the users we would like to shut down
967  */
968  send_test_shutdown(NULL, conn, CS_OK);
969  }
970 
971  /*
972  * We don't sent a reply to the caller here.
973  * We send it when we know if we can shut down or not
974  */
975 
976  LEAVE();
977 }
978 
979 static void message_handler_req_lib_cfg_replytoshutdown (
980  void *conn,
981  const void *msg)
982 {
983  struct cfg_info *ci = (struct cfg_info *)api->ipc_private_data_get (conn);
985  struct res_lib_cfg_replytoshutdown res_lib_cfg_replytoshutdown;
986  int status = CS_OK;
987 
988  ENTER();
989  if (!shutdown_con) {
990  status = CS_ERR_ACCESS;
991  goto exit_fn;
992  }
993 
994  if (req_lib_cfg_replytoshutdown->response) {
995  shutdown_yes++;
997  }
998  else {
999  shutdown_no++;
1001  }
1002  check_shutdown_status();
1003 
1004 exit_fn:
1005  res_lib_cfg_replytoshutdown.header.error = status;
1006  res_lib_cfg_replytoshutdown.header.id = MESSAGE_RES_CFG_REPLYTOSHUTDOWN;
1007  res_lib_cfg_replytoshutdown.header.size = sizeof(res_lib_cfg_replytoshutdown);
1008 
1009  api->ipc_response_send(conn, &res_lib_cfg_replytoshutdown,
1010  sizeof(res_lib_cfg_replytoshutdown));
1011 
1012  LEAVE();
1013 }
1014 
1015 static void message_handler_req_lib_cfg_get_node_addrs (void *conn,
1016  const void *msg)
1017 {
1018  struct totem_ip_address node_ifs[INTERFACE_MAX];
1019  unsigned int iface_ids[INTERFACE_MAX];
1020  char buf[PIPE_BUF];
1021  char **status;
1022  unsigned int num_interfaces = 0;
1023  struct sockaddr_storage *ss;
1024  int ret = CS_OK;
1025  int i;
1026  int live_addrs = 0;
1028  struct res_lib_cfg_get_node_addrs *res_lib_cfg_get_node_addrs = (struct res_lib_cfg_get_node_addrs *)buf;
1029  unsigned int nodeid = req_lib_cfg_get_node_addrs->nodeid;
1030  char *addr_buf;
1031 
1032  if (nodeid == 0)
1033  nodeid = api->totem_nodeid_get();
1034 
1035  if (api->totem_ifaces_get(nodeid, iface_ids, node_ifs, INTERFACE_MAX, &status, &num_interfaces)) {
1036  ret = CS_ERR_EXIST;
1037  num_interfaces = 0;
1038  }
1039 
1040  res_lib_cfg_get_node_addrs->header.size = sizeof(struct res_lib_cfg_get_node_addrs) + (num_interfaces * TOTEMIP_ADDRLEN);
1041  res_lib_cfg_get_node_addrs->header.id = MESSAGE_RES_CFG_GET_NODE_ADDRS;
1042  res_lib_cfg_get_node_addrs->header.error = ret;
1043  if (num_interfaces) {
1044  res_lib_cfg_get_node_addrs->family = node_ifs[0].family;
1045  for (i = 0, addr_buf = (char *)res_lib_cfg_get_node_addrs->addrs;
1046  i < num_interfaces; i++) {
1047  ss = (struct sockaddr_storage *)&node_ifs[i].addr;
1048  if (ss->ss_family) {
1049  memcpy(addr_buf, node_ifs[i].addr, TOTEMIP_ADDRLEN);
1050  live_addrs++;
1051  addr_buf += TOTEMIP_ADDRLEN;
1052  }
1053  }
1054  res_lib_cfg_get_node_addrs->num_addrs = live_addrs;
1055  } else {
1056  res_lib_cfg_get_node_addrs->header.error = CS_ERR_NOT_EXIST;
1057  }
1058  api->ipc_response_send(conn, res_lib_cfg_get_node_addrs, res_lib_cfg_get_node_addrs->header.size);
1059 }
1060 
1061 static void message_handler_req_lib_cfg_local_get (void *conn, const void *msg)
1062 {
1063  struct res_lib_cfg_local_get res_lib_cfg_local_get;
1064 
1065  res_lib_cfg_local_get.header.size = sizeof(res_lib_cfg_local_get);
1066  res_lib_cfg_local_get.header.id = MESSAGE_RES_CFG_LOCAL_GET;
1067  res_lib_cfg_local_get.header.error = CS_OK;
1068  res_lib_cfg_local_get.local_nodeid = api->totem_nodeid_get ();
1069 
1070  api->ipc_response_send(conn, &res_lib_cfg_local_get,
1071  sizeof(res_lib_cfg_local_get));
1072 }
1073 
1074 static void message_handler_req_lib_cfg_reload_config (void *conn, const void *msg)
1075 {
1076  struct req_exec_cfg_reload_config req_exec_cfg_reload_config;
1077  struct iovec iovec;
1078 
1079  ENTER();
1080 
1081  req_exec_cfg_reload_config.header.size =
1082  sizeof (struct req_exec_cfg_reload_config);
1083  req_exec_cfg_reload_config.header.id = SERVICE_ID_MAKE (CFG_SERVICE,
1085  api->ipc_source_set (&req_exec_cfg_reload_config.source, conn);
1086  api->ipc_refcnt_inc(conn);
1087 
1088  iovec.iov_base = (char *)&req_exec_cfg_reload_config;
1089  iovec.iov_len = sizeof (struct req_exec_cfg_reload_config);
1090 
1091  assert (api->totem_mcast (&iovec, 1, TOTEM_SAFE) == 0);
1092 
1093  LEAVE();
1094 }
1095 
1096 static void message_handler_req_lib_cfg_reopen_log_files (void *conn, const void *msg)
1097 {
1098  struct res_lib_cfg_reopen_log_files res_lib_cfg_reopen_log_files;
1099  cs_error_t res;
1100 
1101  ENTER();
1102 
1103  log_printf(LOGSYS_LEVEL_DEBUG, "Reopening logging files\n");
1104 
1105  res = logsys_reopen_log_files();
1106 
1107  res_lib_cfg_reopen_log_files.header.size = sizeof(res_lib_cfg_reopen_log_files);
1108  res_lib_cfg_reopen_log_files.header.id = MESSAGE_RES_CFG_REOPEN_LOG_FILES;
1109  res_lib_cfg_reopen_log_files.header.error = res;
1110  api->ipc_response_send(conn,
1111  &res_lib_cfg_reopen_log_files,
1112  sizeof(res_lib_cfg_reopen_log_files));
1113 
1114  LEAVE();
1115 }
void *(* ipc_private_data_get)(void *conn)
Definition: coroapi.h:256
const char * name
Definition: coroapi.h:491
unsigned short family
Definition: coroapi.h:113
The res_lib_cfg_reopen_log_files struct.
Definition: ipc_cfg.h:230
void(* timer_delete)(corosync_timer_handle_t timer_handle)
Definition: coroapi.h:241
int(* timer_add_duration)(unsigned long long nanoseconds_in_future, void *data, void(*timer_nf)(void *data), corosync_timer_handle_t *handle)
Definition: coroapi.h:229
const char * icmap_iter_next(icmap_iter_t iter, size_t *value_len, icmap_value_types_t *type)
Return next item in iterator iter.
Definition: icmap.c:1087
#define CFG_INTERFACE_STATUS_MAX_LEN
Definition: ipc_cfg.h:43
struct qb_list_head list
Definition: exec/cfg.c:94
cs_error_t icmap_copy_map(icmap_map_t dst_map, const icmap_map_t src_map)
Copy content of src_map icmap to dst_map icmap.
Definition: icmap.c:1290
The res_lib_cfg_replytoshutdown struct.
Definition: ipc_cfg.h:160
The res_lib_cfg_testshutdown struct.
Definition: ipc_cfg.h:167
The totem_ip_address struct.
Definition: coroapi.h:111
The corosync_service_engine struct.
Definition: coroapi.h:490
void icmap_iter_finalize(icmap_iter_t iter)
Finalize iterator.
Definition: icmap.c:1108
void(* shutdown_request)(void)
Definition: coroapi.h:429
cs_error_t logsys_reopen_log_files(void)
Definition: logsys.c:890
uint8_t value[CS_MAX_NAME_LENGTH]
Definition: corotypes.h:64
int coroparse_configparse(icmap_map_t config_map, const char **error_string)
Definition: coroparse.c:258
#define corosync_fatal_error(err)
Definition: coroapi.h:424
int(* ipc_response_send)(void *conn, const void *msg, size_t mlen)
Definition: coroapi.h:258
LOGSYS_DECLARE_SUBSYS("CFG")
int icmap_key_value_eq(const icmap_map_t map1, const char *key_name1, const icmap_map_t map2, const char *key_name2)
Compare value of key with name key_name1 in map1 with key with name key_name2 in map2.
Definition: icmap.c:383
totem_configuration_type
The totem_configuration_type enum.
Definition: coroapi.h:132
int(* totem_ifaces_get)(unsigned int nodeid, unsigned int *interface_ids, struct totem_ip_address *interfaces, unsigned int interfaces_size, char ***status, unsigned int *iface_count)
Definition: coroapi.h:282
The res_lib_cfg_get_node_addrs struct.
Definition: ipc_cfg.h:183
The corosync_lib_handler struct.
Definition: coroapi.h:467
unsigned char addr[TOTEMIP_ADDRLEN]
Definition: coroapi.h:77
mar_name_t struct
Definition: mar_gen.h:166
The req_lib_cfg_get_node_addrs struct.
Definition: ipc_cfg.h:175
The corosync_exec_handler struct.
Definition: coroapi.h:475
void icmap_fini_r(const icmap_map_t map)
Finalize local, reentrant icmap.
Definition: icmap.c:236
icmap_map_t icmap_get_global_map(void)
Return global icmap.
Definition: icmap.c:262
int(* totem_mcast)(const struct iovec *iovec, unsigned int iov_len, unsigned int guarantee)
Definition: coroapi.h:279
#define log_printf(level, format, args...)
Definition: logsys.h:323
void(* exec_handler_fn)(const void *msg, unsigned int nodeid)
Definition: coroapi.h:476
void * tracker_conn
Definition: exec/cfg.c:96
#define SERVICE_ID_MAKE(a, b)
Definition: coroapi.h:458
#define INTERFACE_MAX
Definition: coroapi.h:88
The res_lib_cfg_local_get struct.
Definition: ipc_cfg.h:201
The res_lib_cfg_killnode struct.
Definition: ipc_cfg.h:130
#define TOTEM_SAFE
Definition: coroapi.h:103
unsigned int num_addrs
Definition: ipc_cfg.h:186
unsigned int flags
Definition: ipc_cfg.h:169
The req_lib_cfg_tryshutdown struct.
Definition: ipc_cfg.h:137
unsigned int(* totem_nodeid_get)(void)
Definition: coroapi.h:275
void(* ipc_refcnt_dec)(void *conn)
Definition: coroapi.h:270
The res_lib_cfg_ringreenable struct.
Definition: ipc_cfg.h:114
#define LOGSYS_LEVEL_ERROR
Definition: logsys.h:72
#define TRACE1(format, args...)
Definition: logsys.h:326
#define CFG_INTERFACE_NAME_MAX_LEN
Definition: ipc_cfg.h:42
cs_error_t icmap_delete(const char *key_name)
Delete key from map.
Definition: icmap.c:651
cs_error_t
The cs_error_t enum.
Definition: corotypes.h:94
#define LOGSYS_LEVEL_DEBUG
Definition: logsys.h:76
The corosync_api_v1 struct.
Definition: coroapi.h:225
typedef __attribute__
The req_lib_cfg_replytoshutdown struct.
Definition: ipc_cfg.h:152
The res_lib_cfg_tryshutdown struct.
Definition: ipc_cfg.h:145
cs_error_t icmap_get_uint32(const char *key_name, uint32_t *u32)
Definition: icmap.c:850
#define DEFAULT_SHUTDOWN_TIMEOUT
Definition: exec/cfg.c:78
#define TOTEMIP_ADDRLEN
Definition: coroapi.h:86
#define CFG_MAX_INTERFACES
Definition: ipc_cfg.h:48
const char *(* totem_ip_print)(const struct totem_ip_address *addr)
Definition: coroapi.h:292
#define ENTER
Definition: logsys.h:324
uint32_t mar_uint32_t
Definition: mar_gen.h:53
cfg_message_req_types
Definition: exec/cfg.c:71
The memb_ring_id struct.
Definition: coroapi.h:122
unsigned int flags
Definition: ipc_cfg.h:139
cs_error_t icmap_delete_r(const icmap_map_t map, const char *key_name)
icmap_delete_r
Definition: icmap.c:631
The res_lib_cfg_ringstatusget struct.
Definition: ipc_cfg.h:97
cs_error_t icmap_init_r(icmap_map_t *result)
Initialize additional (local, reentrant) icmap_map.
Definition: icmap.c:188
qb_loop_timer_handle corosync_timer_handle_t
corosync_timer_handle_t
Definition: coroapi.h:74
void * conn
Definition: exec/cfg.c:95
struct corosync_service_engine cfg_service_engine
Definition: exec/cfg.c:232
The res_lib_cfg_reload_config struct.
Definition: ipc_cfg.h:216
#define LOGSYS_LEVEL_NOTICE
Definition: logsys.h:74
cs_error_t icmap_set_uint8(const char *key_name, uint8_t value)
Definition: icmap.c:571
void(* lib_handler_fn)(void *conn, const void *msg)
Definition: coroapi.h:468
struct corosync_service_engine * cfg_get_service_engine_ver0(void)
Definition: exec/cfg.c:249
int(* ipc_dispatch_send)(void *conn, const void *msg, size_t mlen)
Definition: coroapi.h:263
unsigned int nodeid
Definition: coroapi.h:75
icmap_iter_t icmap_iter_init_r(const icmap_map_t map, const char *prefix)
icmap_iter_init_r
Definition: icmap.c:1076
icmap_iter_t icmap_iter_init(const char *prefix)
Initialize iterator with given prefix.
Definition: icmap.c:1081
struct memb_ring_id ring_id
Definition: totemsrp.c:264
void(* ipc_source_set)(mar_message_source_t *source, void *conn)
Definition: coroapi.h:252
The req_lib_cfg_killnode struct.
Definition: ipc_cfg.h:121
#define LEAVE
Definition: logsys.h:325
qb_map_iter_t * icmap_iter_t
Itterator type.
Definition: icmap.h:123
The cs_name_t struct.
Definition: corotypes.h:62
enum cfg_info::@6 shutdown_reply
The mar_message_source_t struct.
Definition: coroapi.h:50
void(* ipc_refcnt_inc)(void *conn)
Definition: coroapi.h:268