corosync_overview.7 7.4 KB

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