4
0

corosync_overview.7 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. .\"/*
  2. .\" * Copyright (c) 2005 MontaVista Software, Inc.
  3. .\" * Copyright (c) 2006-2023 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. .TH COROSYNC_OVERVIEW 7 2018-11-13 "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
  36. .SH NAME
  37. corosync_overview \- Corosync overview
  38. .SH OVERVIEW
  39. The corosync project's purpose is to implement and support a production quality
  40. Revised BSD licensed implementation of a high performance low overhead high
  41. availability development toolkit.
  42. Faults occur for various reasons:
  43. .PP
  44. * Application Faults
  45. .PP
  46. * Middleware Faults
  47. .PP
  48. * Operating System Faults
  49. .PP
  50. * Hardware Faults
  51. The major focus of high availability in the past has been to mask hardware
  52. faults. Faults in other components of the system have gone unsolved until
  53. Corosync. Corosync is designed for applications to replicate their state
  54. to multiple processors, with the actual limit determined by factors such as
  55. CPU performance, network latency, and network bandwidth. The processors all
  56. contain a replica of the application state.
  57. The corosync project provides a group message API called CPG.
  58. The project developers recommend CPG be used for most applications. The CPG
  59. service implements a closed group messaging model presenting extended virtual
  60. synchrony guarantees.
  61. To manage conditions where the process executing the CPG application exchange
  62. fails, we provide the Simple Availability Manager (sam) to provide simple
  63. application restart.
  64. .SH QUICKSTART
  65. The corosync executive must be configured. In the directory conf in the
  66. source distribution are several files that must be copied to the /etc/corosync
  67. directory. If corosync is packaged by a distro, this may be complete.
  68. The directory contains the file corosync.conf. Please read the corosync.conf(5)
  69. man page for details on the configuration options. The corosync project will
  70. work out of the box with the default configuration options, although the
  71. administrator may desire different options.
  72. The corosync executive uses cryptographic techniques to ensure authenticity
  73. and privacy of the messages. In order for corosync to be secure and operate,
  74. a private key must be generated and shared to all processors.
  75. First generate the key on one of the nodes:
  76. .nf
  77. unix# corosync-keygen
  78. Corosync Cluster Engine Authentication key generator.
  79. Gathering 2048 bits for key from /dev/urandom.
  80. Writing corosync key to /etc/corosync/authkey.
  81. .fi
  82. After this operation, a private key will be in the file /etc/corosync/authkey.
  83. This private key must be copied to every processor in the cluster. If the
  84. private key isn't the same for every node, those nodes with nonmatching private
  85. keys will not be able to join the same configuration.
  86. Copy the key to some security transportable storage or use ssh to transmit the
  87. key from node to node. Then install the key with the command:
  88. unix#: install -D --group=0 --owner=0 --mode=0400 /path_to_authkey/authkey /etc/corosync/authkey
  89. If a message "Invalid digest" appears from the corosync executive, the keys
  90. are not consistent between processors.
  91. Finally run the corosync executive. If corosync is packaged from a distro, it
  92. may be set to start on system start. It may also be turned off by default in
  93. which case the init script for corosync must be enabled.
  94. .SH USING LIBRARIES
  95. The corosync libraries have header files which must be included in the
  96. developer's application. Once the header file is included, the developer can
  97. reference the corosync interfaces.
  98. The corosync project recommends that distros place include files in
  99. /usr/include/corosync.
  100. .SH IPv6
  101. The corosync project supports both IPv4 and IPv6 network addresses. When using
  102. knet as the transport each link should have the same IP family, but different links
  103. can have different families (eg link 0 could be all IPv4, and link 1 all IPv6).
  104. When using UDP/UDPU the single link should use the same family on all nodes.
  105. To configure a host for IPv6, use the ifconfig program to add interfaces:
  106. box20: ifconfig eth0 add fec0::1:a800:4ff:fe00:20/64
  107. box30: ifconfig eth0 add fec0::1:a800:4ff:fe00:30/64
  108. If the /64 is not specified, a route for the IPv6 network will not be configured
  109. which will cause significant problems. Make sure a route is available for
  110. IPv6 traffic.
  111. .SH ARCHITECTURE
  112. The corosync libraries are a thin IPC interface to the corosync executive. The
  113. corosync executive implements the functionality of the corosync APIs for
  114. distributed computing.
  115. The corosync executive uses the Totem extended virtual synchrony protocol. The
  116. advantage to the end user is excellent performance characteristics and a proven
  117. protocol with excellent reliability. This protocol connects the processors
  118. in a configuration together so they may communicate.
  119. .SH SECURITY
  120. The corosync executive optionally encrypts and signs all messages sent
  121. over the network. For more details see
  122. .B crypto_model,
  123. .B crypto_hash
  124. and
  125. .B crypto_cipher
  126. options in the
  127. .BR corosync.conf (5).
  128. If membership messages can be captured by intruders, it is possible to execute
  129. a denial of service attack on the cluster. In this scenario, the cluster is
  130. likely already compromised and a DoS attack is the least of the administration's
  131. worries.
  132. The security in corosync does not offer perfect forward secrecy because the keys
  133. are reused. It may be possible for an intruder to determine the shared key by
  134. capturing packets in an automated fashion. No such automated attack has
  135. been published as of yet. In this scenario, the cluster is likely already
  136. compromised to allow the long-term capture of transmitted data.
  137. For security reasons, the corosync executive binary should NEVER
  138. be setuid or setgid in the filesystem.
  139. .SH BUGS
  140. None that are known.
  141. .SH "SEE ALSO"
  142. .BR corosync.conf (5),
  143. .BR corosync-keygen (8),
  144. .BR corosync_quorumtool (8),
  145. .BR corosync_cfgtool (8),
  146. .BR corosync_cpgtool (8),
  147. .BR corosync_cmaptool (8),
  148. .BR cpg_overview (3),
  149. .BR sam_overview (3)
  150. .PP