corosync-qnetd.8 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. .\"/*
  2. .\" * Copyright (C) 2016-2018 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 2018-08-09
  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 or systemd unit, because both of them takes
  133. care of the /var/run/corosync-qnetd creation and sets the correct owner and permissions.
  134. The last step is to make sure
  135. .B corosync-qnetd
  136. is really executed as an unprivileged user. For initscript systems it's enough to set the
  137. line COROSYNC_QNETD_RUNAS in /etc/(sysconfig|default)/corosync-qnetd file. If the file
  138. is not already installed then use the one provided in the corosync source code
  139. (init/corosync-qnetd.sysconfig.example). For systemd, overwrite/copy the
  140. corosync-qnetd.service unit file and uncomment/change the "User=" directive.
  141. .SH TLS CONFIGURATION
  142. For TLS to work its necessary to create the NSS database. If pcs is used then the following
  143. steps are not needed because pcs does them automatically.
  144. .B corosync-qnetd-certutil
  145. is the tool to perform required actions. Just run:
  146. .nf
  147. # corosync-qnetd-certutil -i
  148. .fi
  149. If TLS is not required then simply edit /etc/(sysconfig|default)/corosync-qnetd or
  150. systemd unit file and add the parameter
  151. .B -s
  152. .I off
  153. in the proper place.
  154. Depending on configuration of NSS (stored in nss.config file usually in
  155. /etc/crypto-policies/back-ends/ directory) disabled ciphers or too short keys
  156. may be rejected. Proper solution is to regenerate NSS databases for both
  157. .B corosync-qnetd
  158. and
  159. .B corosync-qdevice
  160. daemons. As a quick workaround it's also possible to set environment variable
  161. .I NSS_IGNORE_SYSTEM_POLICY=1
  162. before running
  163. .B corosync-qnetd
  164. daemon.
  165. When NSS is updated it may also be needed to upgrade database into new format. There is no
  166. consensus on recommended way, but following command seems to work just fine (if qnetd
  167. sysconfdir is set to /etc)
  168. .nf
  169. # certutil -N -d /etc/corosync/qnetd/nssdb -f /etc/corosync/qnetd/nssdb/pwdfile.txt
  170. .fi
  171. .SH ADVANCED SETTINGS
  172. Set by the
  173. .B -S
  174. option. The default value is shown in parentheses.
  175. .TP
  176. .B listen_backlog
  177. Parameter passed to the listen syscall on the network socket. (10)
  178. .TP
  179. .B max_client_send_buffers
  180. Maximum number of send buffers for one client. (32)
  181. .TP
  182. .B max_client_send_size
  183. Maximum size of one send buffer (message) to be sent to a client. (32768)
  184. .TP
  185. .B max_client_receive_size
  186. Maximum size of the receive buffer for a client message (maximum
  187. allowed message size received by client). (32768)
  188. .TP
  189. .B nss_db_dir
  190. NSS database directory. (/etc/corosync/qnetd/nssdb)
  191. .TP
  192. .B cert_nickname
  193. NSS nickname of qnetd server certificate. (QNetd Cert)
  194. .TP
  195. .B heartbeat_interval_min
  196. Minimum heartbeat timeout accepted by server in ms. (1000)
  197. .TP
  198. .B heartbeat_interval_max
  199. Maximum heartbeat timeout accepted by server in ms. (120000)
  200. .TP
  201. .B dpd_enabled
  202. Dead peer detection enabled. (on)
  203. .TP
  204. .B dpd_interval
  205. How often the DPD algorithm detects dead peers in ms. (10000)
  206. .TP
  207. .B lock_file
  208. Lock file location. (/var/run/corosync-qnetd/corosync-qnetd.pid)
  209. .TP
  210. .B local_socket_file
  211. Internal IPC socket file location. (/var/run/corosync-qnetd/corosync-qnetd.sock)
  212. .TP
  213. .B local_socket_backlog
  214. Parameter passed to listen syscall on the local socket. (10)
  215. .TP
  216. .B ipc_max_clients
  217. Maximum allowed simultaneous IPC clients. (10)
  218. .TP
  219. .B ipc_max_receive_size
  220. Maximum size of a message received by IPC client. (4096)
  221. .TP
  222. .B ipc_max_send_size
  223. Maximum size of a message sent to an IPC client. (10485760)
  224. .SH SEE ALSO
  225. .BR corosync-qnetd-tool (8)
  226. .BR corosync-qnetd-certutil (8)
  227. .BR corosync-qdevice (8)
  228. .SH AUTHOR
  229. Jan Friesse
  230. .PP