4
0

corosync-qnetd.8 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. .\"/*
  2. .\" * Copyright (C) 2016 Red Hat, Inc.
  3. .\" *
  4. .\" * All rights reserved.
  5. .\" *
  6. .\" * Author: Jan Friesse <jfriesse@redhat.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 Red Hat, 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 COROSYNC-QNETD 8 2016-06-29
  35. .SH NAME
  36. corosync-qnetd \- QNet daemon
  37. .SH SYNOPSIS
  38. .B "corosync-qnetd [-46dfhv] [-l listen_addr] [-p listen_port] [-s tls]
  39. .B [-c client_cert_required] [-m max_clients] [-S option=value[,option2=value2,...]]"
  40. .SH DESCRIPTION
  41. .B corosync-qnetd
  42. is a daemon running outside of the cluster with the purpose of providing a vote to the
  43. .B corosync-qdevice
  44. model net. It's designed to support multiple clusters and be almost configuration
  45. and state free. New clusters are handled dynamically and no configuration file exists.
  46. It's also able to run as non-root user - which is recommended. Connection between the
  47. .B corosync-qdevice
  48. model net client can be optionally configured with TLS client certificate checking.
  49. The communication protocol between server and client is designed to be very simple
  50. and allow backwards compatibility.
  51. .SH OPTIONS
  52. .TP
  53. .B -4
  54. and its counterpart
  55. .B -6
  56. are used to force IPv4 or IPv6 communication. The default is to listen on both address families.
  57. .TP
  58. .B -d
  59. Turn on debug logging. By default the messages sent to syslog are purely operational, this
  60. option sends additional debug messages. For even more detail use the
  61. .B -d
  62. parameter twice.
  63. .TP
  64. .B -f
  65. Do not daemonize, run in the foreground.
  66. .TP
  67. .B -h
  68. Show short help text
  69. .TP
  70. .B -v
  71. Show version and supported communication protocol messages/options.
  72. .TP
  73. .B -l
  74. IP address to listen on. By default the daemon listens on all addresses (wildcard).
  75. .TP
  76. .B -p
  77. TCP port to listen on. Default port is 5403.
  78. .TP
  79. .B -s
  80. Determines if TLS should be used and can be one of
  81. .I on/off/required
  82. (the default is
  83. .I on
  84. ).
  85. .I on
  86. means TLS is enabled but the client is not required to start TLS,
  87. .I off
  88. means TLS is completely disabled, and
  89. .I required
  90. means TLS is required.
  91. .I on
  92. and
  93. .I required
  94. require the NSS database to be properly initialized by running the
  95. .B corosync-qnetd-certutil
  96. command.
  97. .TP
  98. .B -c
  99. can be set to
  100. .I on/off.
  101. This option only makes sense if TLS is enabled. When
  102. .B -c
  103. is
  104. .I on
  105. a client is required to send its client certificate (default).
  106. .TP
  107. .B -m
  108. Maximum simultaneous clients. The default is 0 which means no limit.
  109. .TP
  110. .B -S
  111. Set advanced settings described in its own section below. This option
  112. shouldn't be generally used because most of the options are
  113. not safe to change.
  114. .SH UNPRIVILEGED USER CONFIGURATION
  115. It's generally recommended to run
  116. .B corosync-qnetd
  117. as a non root user. If you get a package from a distribution its highly
  118. possible that the packager has done all the hard work for you. If the installation
  119. is performed from source code, a few steps have to be taken.
  120. First it's necessary to create an unprivileged user/group. The following commands
  121. can be used (executed as root):
  122. .nf
  123. # groupadd -r coroqnetd
  124. # useradd -r -g coroqnetd -d / -s /sbin/nologin -c "User for corosync-qnetd" coroqnetd
  125. .fi
  126. The next step is to set the correct owner and group on /etc/corosync/qnetd and /var/run/corosync-qnetd
  127. directories.
  128. .nf
  129. # chown -R coroqnetd:coroqnetd /etc/corosync/qnetd /var/run/corosync-qnetd
  130. .fi
  131. Some systems have the /var/run directory on a tmpfs file system which gets discarded after
  132. a reboot. The solution is to use an initscript which takes care of the /var/run/corosync-qnetd
  133. creation and sets the correct owner and permissions. For systems with systemd it's possible
  134. to use a tmpfile.d configuration file (installed by default if systemd is enabled during
  135. corosync compilation).
  136. The last step is to make sure
  137. .B corosync-qnetd
  138. is really executed as an unprivileged user. For initscript systems it's enough to set the
  139. line COROSYNC_QNETD_RUNAS in /etc/(sysconfig|default)/corosync-qnetd file. If the file
  140. is not already installed then use the one provided in the corosync source code
  141. (init/corosync-qnetd.sysconfig.example). For systemd, overwrite/copy the
  142. corosync-qnetd.service unit file and uncomment/change the "User=" directive.
  143. .SH TLS CONFIGURATION
  144. For TLS to work its necessary to create the NSS database. If pcs is used then the following
  145. steps are not needed because pcs does them automatically.
  146. .B corosync-qnetd-certutil
  147. is the tool to perform required actions. Just run:
  148. .nf
  149. # corosync-qnetd-certutil -i
  150. .fi
  151. If TLS is not required then simply edit /etc/(sysconfig|default)/corosync-qnetd or
  152. systemd unit file and add the parameter
  153. .B -s
  154. .I off
  155. in the proper place.
  156. .SH ADVANCED SETTINGS
  157. Set by the
  158. .B -S
  159. option. The default value is shown in parentheses.
  160. .TP
  161. .B listen_backlog
  162. Parameter passed to the listen syscall on the network socket. (10)
  163. .TP
  164. .B max_client_send_buffers
  165. Maximum number of send buffers for one client. (32)
  166. .TP
  167. .B max_client_send_size
  168. Maximum size of one send buffer (message) to be sent to a client. (32768)
  169. .TP
  170. .B max_client_receive_size
  171. Maximum size of the receive buffer for a client message (maximum
  172. allowed message size received by client). (32768)
  173. .TP
  174. .B nss_db_dir
  175. NSS database directory. (/etc/corosync/qnetd/nssdb)
  176. .TP
  177. .B cert_nickname
  178. NSS nickname of qnetd server certificate. (QNetd Cert)
  179. .TP
  180. .B heartbeat_interval_min
  181. Minimum heartbeat timeout accepted by server in ms. (1000)
  182. .TP
  183. .B heartbeat_interval_max
  184. Maximum heartbeat timeout accepted by server in ms. (120000)
  185. .TP
  186. .B dpd_enabled
  187. Dead peer detection enabled. (on)
  188. .TP
  189. .B dpd_interval
  190. How often the DPD algorithm detects dead peers in ms. (10000)
  191. .TP
  192. .B lock_file
  193. Lock file location. (/var/run/corosync-qnetd/corosync-qnetd.pid)
  194. .TP
  195. .B local_socket_file
  196. Internal IPC socket file location. (/var/run/corosync-qnetd/corosync-qnetd.sock)
  197. .TP
  198. .B local_socket_backlog
  199. Parameter passed to listen syscall on the local socket. (10)
  200. .TP
  201. .B ipc_max_clients
  202. Maximum allowed simultaneous IPC clients. (10)
  203. .TP
  204. .B ipc_max_receive_size
  205. Maximum size of a message received by IPC client. (4096)
  206. .TP
  207. .B ipc_max_send_size
  208. Maximum size of a message sent to an IPC client. (10485760)
  209. .SH SEE ALSO
  210. .BR corosync-qnetd-tool (8)
  211. .BR corosync-qnetd-certutil (8)
  212. .BR corosync-qdevice (8)
  213. .SH AUTHOR
  214. Jan Friesse
  215. .PP