openais_overview.8 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. .\"/*
  2. .\" * Copyright (c) 2005 MontaVista Software, Inc.
  3. .\" *
  4. .\" * All rights reserved.
  5. .\" *
  6. .\" * Author: Steven Dake (sdake@mvista.com)
  7. .\" *
  8. .\" * This software licensed under BSD license, the text of which follows:
  9. .\" *
  10. .\" * Redistribution and use in source and binary forms, with or without
  11. .\" * modification, are permitted provided that the following conditions are met:
  12. .\" *
  13. .\" * - Redistributions of source code must retain the above copyright notice,
  14. .\" * this list of conditions and the following disclaimer.
  15. .\" * - Redistributions in binary form must reproduce the above copyright notice,
  16. .\" * this list of conditions and the following disclaimer in the documentation
  17. .\" * and/or other materials provided with the distribution.
  18. .\" * - Neither the name of the MontaVista Software, Inc. nor the names of its
  19. .\" * contributors may be used to endorse or promote products derived from this
  20. .\" * software without specific prior written permission.
  21. .\" *
  22. .\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  23. .\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  24. .\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  25. .\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  26. .\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  27. .\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  28. .\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  29. .\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  30. .\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  31. .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  32. .\" * THE POSSIBILITY OF SUCH DAMAGE.
  33. .\" */
  34. .TH OPENAIS_OVERVIEW 8 2005-06-08 "openais Man Page" "Openais Programmer's Manual"
  35. .SH OVERVIEW
  36. The openais project is a project to implement a production quality "Revised BSD"
  37. licensed implementation of the most recent SA Forum's Application Interface
  38. Specification. The Application Interface Specification is a software API and
  39. policies which are used to develop applications that maintain service during
  40. faults. The API consists of Availability Management Framework (AMF) which
  41. provides application failover, Cluster Membership (CLM), Checkpointing (CKPT),
  42. Eventing (EVT), Messaging (MSG), and Distributed Locking (DLOCK).
  43. Currently Messaging is unimplemented.
  44. Faults occur for various reasons:
  45. .PP
  46. * Application Faults
  47. .PP
  48. * Middleware Faults
  49. .PP
  50. * Operating System Faults
  51. .PP
  52. * Hardware Faults
  53. The major focus of high availability in the past has been to mask hardware
  54. faults. Faults in other components of the system have gone unsolved until
  55. AIS. AIS can mask many types of faults in applications, middleware,
  56. operating systems, or even hardware by providing a simple framework
  57. for allowing developers to create redundant applications. These redundant
  58. applications can be distributed over multiple nodes such that if any one
  59. node faults, another node can recover.
  60. Application programmers develop applications to periodically record their
  61. state using the checkpointing service. When an active application fails,
  62. a standby application recovers the state of the application. This
  63. technique, called stateful application failover, provides the fundamental
  64. difference between openais and other systems that have come before it.
  65. With stateful application failover, the end-application user doesn't
  66. have to reload the application or redial a telephone. The full state
  67. is recorded, so the end-application user sees no interruption in service.
  68. Because programmers can now distribute applications across multiple
  69. processes or nodes, a mechanism must exist for them to communicate.
  70. This mechanism is provided by two services. The event service provides
  71. a publish/subscribe model for events. The messaging service provides
  72. end to end messaging. Finally a mechanism to synchronize access is
  73. provided by the distributed lock service.
  74. The openais project also provides a group messaging toolkit called EVS.
  75. The EVS service implements a messaging model known as Extended Virtual
  76. Synchrony. This model allows one sender to transmit to many receivers.
  77. Certain guarantees are provided for message and membership delivery
  78. which make virtual synchrony ideal for developing distributed applications.
  79. .SH QUICKSTART
  80. The openais executive must be configured. In the directory conf in the
  81. source distribution are several files that must be copied to the /etc/ais
  82. directory. If openais is packaged by a distro, this may be complete.
  83. The directory contains the file openais.conf. Please read the openais.conf(5)
  84. man page for details on the configuration options. The openais project will
  85. work out of the box with the default configuration options, although the
  86. administrator may desire different options.
  87. An user and group of the name "ais" must be added to the system. If openais
  88. is packaged from a distro, this step should already be completed.
  89. This can be achieved by executing:
  90. [root@slickdeal root]# adduser ais -g ais
  91. The openais executive uses cryptographic techniques to ensure authenticity
  92. and privacy of the messages. In order for openais to be secure and operate,
  93. a private key must be generated and shared to all processors.
  94. First generate the key on one of the nodes:
  95. unix# ais-keygen
  96. openais authentication key generator.
  97. .PP
  98. Gathering 1024 bits for key from /dev/random.
  99. .PP
  100. Writing openais key to /etc/ais/authkey.
  101. .PP
  102. After this operation, a private key will be in the file /etc/ais/authkey.
  103. This private key must be copied to every processor in the cluster. If the
  104. private key isn't the same for every node, those nodes with nonmatching private
  105. keys will not be able to join the same configuration.
  106. Copy the key to some security transportable storage or use ssh to transmit the
  107. key from node to node. Then install the key with the command:
  108. unix#: install -D --group=0 --owner=0 --mode=0400 /path_to_authkey/authkey /etc/ais/authkey
  109. If a message "Invalid digest" appears from the openais executive, the keys
  110. are not consistent between processors.
  111. Finally run the openais executive. If openais is packaged from a distro, it
  112. may be set to start on system start. It may also be turned off by default in
  113. which case the init script for openais must be enabled.
  114. After running aisexec, a list of all processors IP addresses running the ais
  115. executive and configured on the same multicast address will appear. If they
  116. don't appear, there may be a problem with multicast in the distro or hardware.
  117. If this happens, participation in the openais mailing list may help solve the
  118. problem. The email address is openais@lists.osdl.org.
  119. .SH USING LIBRARIES
  120. The openais AIS libraries have header files which must be included in the
  121. developer's application. Once the header file is included, the developer can
  122. reference the AIS interfaces.
  123. The openais project recommends to distros to place include files in
  124. /usr/include/openais. The following include lines must be added to
  125. the application to use each of the following services:
  126. #include <openais/saClm.h> For the Cluster Membership B.01.01 service.
  127. .PP
  128. #include <openais/saCkpt.h> For the Checkpointing B.01.01 service.
  129. .PP
  130. #include <openais/saEvt.h> For the Eventing B.01.01 service.
  131. .PP
  132. #include <openais/ais_amf.h> For the AMF A.01.01 service.
  133. .PP
  134. The openais project recommends to distros to place library files in
  135. /usr/lib. The following link lines must be added to the LDFLAGS section
  136. of the makefile.
  137. -lsaClm For the Cluster Membership B.01.01 service
  138. .PP
  139. -lsaCkpt For the Checkpointing B.01.01 service
  140. .PP
  141. -lsaEvt For the Eventing B.01.01 service
  142. .PP
  143. -lsaAmf For the AMF A.01.01 service
  144. .PP
  145. -lais Specify this to get access to all AIS libraries without specifying
  146. each library individually.
  147. .SH IPv6
  148. The openais project supports both IPv4 and IPv6 network addresses. The entire
  149. cluster must use either IPv4 or IPv6 for the cluster communication mechanism.
  150. In order to use IPv6, IPv6 addresses must be specified in the bindnetaddr and
  151. mcastaddr fields in the configuration file. The nodeid field must also be
  152. set.
  153. An example of this is:
  154. nodeid: 2
  155. bindnetaddr: fec0::1:a800:4ff:fe00:20
  156. mcastaddr: ff05::1
  157. To configure a host for IPv6, use the ifconfig program to add interfaces:
  158. box20: ifconfig eth0 add fec0::1:a800:4ff:fe00:20/64
  159. box30: ifconfig eth0 add fec0::1:a800:4ff:fe00:30/64
  160. If the /64 is not specified, a route for the IPv6 network will not be configured
  161. which will cause significant problems. Make sure a route is available for
  162. IPv6 traffic.
  163. .SH ARCHITECTURE
  164. The AIS libraries are a thin IPC interface to the openais executive. The
  165. openais executive provides services for the SA Forum AIS libraries as well
  166. as the EVS library.
  167. The openais executive uses the Totem extended virtual synchrony protocol. The
  168. advantage to the end user is excellent performance characteristics and a proven
  169. protocol with excellent reliability. This protocol connects the processors
  170. in a configuration together so they may communicate.
  171. .SH SECURITY
  172. The openais executive encrypts all messages sent over the network using the
  173. SOBER-128 stream cipher. The openais executive uses HMAC and SHA1 to
  174. authenticate all messages. The openais executive library uses SOBER-128
  175. as a pseudo random number generator. The EVS library feeds the PRNG using
  176. the /dev/random Linux device.
  177. .PP
  178. .SH SAFTEST COMPLIANCE
  179. The openais libraries are now nearly compliant with every aspect of the SA
  180. Forum's AIS specification. The AMF service, however, is not compliant with the
  181. B.01.01 specification. The remaining services pass most of the tests of the
  182. saftest suite against the B.01.01 specification.
  183. .SH BUGS
  184. The openais project does not currently implement the messaging service.
  185. The distributed locking service is buggy and incomplete.
  186. .SH "SEE ALSO"
  187. .BR openais.conf (5),
  188. .BR evs_overview (8)
  189. .PP