corosync_overview.8 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. .\"/*
  2. .\" * Copyright (c) 2005 MontaVista Software, Inc.
  3. .\" * Copyright (c) 2006-2009 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 8 2012-02-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. unix# corosync-keygen
  76. .br
  77. Corosync Cluster Engine Authentication key generator.
  78. .br
  79. Gathering 1024 bits for key from /dev/random.
  80. .br
  81. Press keys on your keyboard to generate entropy.
  82. .br
  83. Writing corosync key to /etc/corosync/authkey.
  84. .PP
  85. After this operation, a private key will be in the file /etc/corosync/authkey.
  86. This private key must be copied to every processor in the cluster. If the
  87. private key isn't the same for every node, those nodes with nonmatching private
  88. keys will not be able to join the same configuration.
  89. Copy the key to some security transportable storage or use ssh to transmit the
  90. key from node to node. Then install the key with the command:
  91. unix#: install -D --group=0 --owner=0 --mode=0400 /path_to_authkey/authkey /etc/corosync/authkey
  92. If a message "Invalid digest" appears from the corosync executive, the keys
  93. are not consistent between processors.
  94. Finally run the corosync executive. If corosync is packaged from a distro, it
  95. may be set to start on system start. It may also be turned off by default in
  96. which case the init script for corosync must be enabled.
  97. .SH USING LIBRARIES
  98. The corosync libraries have header files which must be included in the
  99. developer's application. Once the header file is included, the developer can
  100. reference the corosync interfaces.
  101. The corosync project recommends to distros to place include files in
  102. /usr/include/corosync.
  103. .SH IPv6
  104. The corosync project supports both IPv4 and IPv6 network addresses. The entire
  105. cluster must use either IPv4 or IPv6 for the cluster communication mechanism.
  106. In order to use IPv6, IPv6 addresses must be specified in the bindnetaddr and
  107. mcastaddr fields in the configuration file. The nodeid field must also be
  108. set.
  109. An example of this is:
  110. nodeid: 2
  111. bindnetaddr: fec0::1:a800:4ff:fe00:20
  112. mcastaddr: ff05::1
  113. To configure a host for IPv6, use the ifconfig program to add interfaces:
  114. box20: ifconfig eth0 add fec0::1:a800:4ff:fe00:20/64
  115. box30: ifconfig eth0 add fec0::1:a800:4ff:fe00:30/64
  116. If the /64 is not specified, a route for the IPv6 network will not be configured
  117. which will cause significant problems. Make sure a route is available for
  118. IPv6 traffic.
  119. .SH ARCHITECTURE
  120. The corosync libraries are a thin IPC interface to the corosync executive. The
  121. corosync executive implements the functionality of the corosync APIs for
  122. distributed coming.
  123. The corosync executive uses the Totem extended virtual synchrony protocol. The
  124. advantage to the end user is excellent performance characteristics and a proven
  125. protocol with excellent reliability. This protocol connects the processors
  126. in a configuration together so they may communicate.
  127. .SH ENVIRONMENT VARIABLES
  128. The corosync executive process uses four environment variables during startup.
  129. If these environment variables are not set, defaults will be used.
  130. .TP
  131. COROSYNC_MAIN_CONFIG_FILE
  132. This specifies the fully qualified path to the corosync configuration file.
  133. The default is /etc/corosync/corosync.conf.
  134. .TP
  135. COROSYNC_TOTEM_AUTHKEY_FILE
  136. This specifies the fully qualified path to the shared key used to
  137. authenticate and encrypt data used within the Totem protocol.
  138. The default is /etc/corosync/authkey.
  139. .SH SECURITY
  140. The corosync executive optionally encrypts all messages sent over the network
  141. using the SOBER-128 stream cipher. The corosync executive uses HMAC and SHA1 to
  142. authenticate all messages. The corosync executive library uses SOBER-128
  143. as a pseudo random number generator.
  144. If membership messages can be captured by intruders, it is possible to execute
  145. a denial of service attack on the cluster. In this scenario, the cluster is
  146. likely already compromised and a DOS attack is the least of the administration's
  147. worries.
  148. The security in corosync does not offer perfect forward secrecy because the keys
  149. are reused. It may be possible for an intruder by capturing packets in an
  150. automated fashion to determine the shared key. No such automated attack has
  151. been published as of yet. In this scenario, the cluster is likely already
  152. compromised to allow the long-term capture of transmitted data.
  153. For security reasons, the corosync executive binary should NEVER
  154. be setuid or setgid in the filesystem.
  155. .SH BUGS
  156. None that are known.
  157. .SH "SEE ALSO"
  158. .BR corosync.conf (5),
  159. .BR corosync-keygen (8),
  160. .BR cpg_overview (8),
  161. .BR sam_overview (8)
  162. .PP