corosync.conf.5 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061
  1. .\"/*
  2. .\" * Copyright (c) 2005 MontaVista Software, Inc.
  3. .\" * Copyright (c) 2006-2022 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_CONF 5 2022-10-20 "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
  36. .SH NAME
  37. corosync.conf - corosync executive configuration file
  38. .SH SYNOPSIS
  39. /etc/corosync/corosync.conf
  40. .SH DESCRIPTION
  41. The corosync.conf instructs the corosync executive about various parameters
  42. needed to control the corosync executive. Empty lines and lines starting with
  43. # character are ignored. The configuration file consists of bracketed top level
  44. directives. The possible directive choices are:
  45. .TP
  46. totem { }
  47. This top level directive contains configuration options for the totem protocol.
  48. .TP
  49. logging { }
  50. This top level directive contains configuration options for logging.
  51. .TP
  52. quorum { }
  53. This top level directive contains configuration options for quorum.
  54. .TP
  55. nodelist { }
  56. This top level directive contains configuration options for nodes in cluster.
  57. .TP
  58. system { }
  59. This top level directive contains configuration options related to system.
  60. .TP
  61. resources { }
  62. This top level directive contains configuration options for resources.
  63. .TP
  64. nozzle { }
  65. This top level directive contains configuration options for a libnozzle device.
  66. .PP
  67. The
  68. .B interface sub-directive of totem is optional for UDP and knet transports.
  69. For knet, multiple interface subsections define parameters for each knet link on the
  70. system.
  71. For UDPU an interface section is not needed and it is recommended that the nodelist
  72. is used to define cluster nodes.
  73. .TP
  74. linknumber
  75. This specifies the link number for the interface. When using the knet
  76. protocol, each interface should specify separate link numbers to uniquely
  77. identify to the membership protocol which interface to use for which link.
  78. The linknumber must start at 0. For UDP the only supported linknumber is 0.
  79. .TP
  80. knet_link_priority
  81. This specifies the priority for the link when knet is used in 'passive'
  82. mode. (see link_mode below)
  83. .TP
  84. knet_ping_interval
  85. This specifies the interval between knet link pings.
  86. knet_ping_interval and knet_ping_timeout
  87. are a pair, if one is specified the other should be too, otherwise one will be calculated from
  88. the token timeout and one will be taken from the config file.
  89. (default is token timeout / (knet_pong_count*2))
  90. .TP
  91. knet_ping_timeout
  92. If no ping is received within this time, the knet link is declared dead.
  93. knet_ping_interval and knet_ping_timeout
  94. are a pair, if one is specified the other should be too, otherwise one will be calculated from
  95. the token timeout and one will be taken from the config file.
  96. (default is token timeout / knet_pong_count)
  97. .TP
  98. knet_ping_precision
  99. How many values of latency are used to calculate
  100. the average link latency. (default 2048 samples)
  101. .TP
  102. knet_pong_count
  103. How many valid ping/pongs before a link is marked UP. (default 2)
  104. .TP
  105. knet_transport
  106. Which IP transport knet should use. valid values are "sctp" or "udp". (default: udp)
  107. .TP
  108. bindnetaddr (udp only)
  109. This specifies the network address the corosync executive should bind
  110. to when using udp.
  111. bindnetaddr (udp only)
  112. should be an IP address configured on the system, or a network
  113. address.
  114. For example, if the local interface is 192.168.5.92 with netmask
  115. 255.255.255.0, you should set bindnetaddr to 192.168.5.92 or 192.168.5.0.
  116. If the local interface is 192.168.5.92 with netmask 255.255.255.192,
  117. set bindnetaddr to 192.168.5.92 or 192.168.5.64, and so forth.
  118. This may also be an IPV6 address, in which case IPV6 networking will be used.
  119. In this case, the exact address must be specified and there is no automatic
  120. selection of the network interface within a specific subnet as with IPv4.
  121. If IPv6 networking is used, the nodeid field in nodelist must be specified.
  122. .TP
  123. broadcast (udp only)
  124. This is optional and can be set to yes. If it is set to yes, the broadcast
  125. address will be used for communication. If this option is set, mcastaddr
  126. should not be set.
  127. .TP
  128. mcastaddr (udp only)
  129. This is the multicast address used by corosync executive. The default
  130. should work for most networks, but the network administrator should be queried
  131. about a multicast address to use. Avoid 224.x.x.x because this is a "config"
  132. multicast address.
  133. This may also be an IPV6 multicast address, in which case IPV6 networking
  134. will be used. If IPv6 networking is used, the nodeid field in nodelist must
  135. be specified.
  136. It's not necessary to use this option if cluster_name option is used. If both options
  137. are used, mcastaddr has higher priority.
  138. .TP
  139. mcastport (udp only)
  140. This specifies the UDP port number. It is possible to use the same multicast
  141. address on a network with the corosync services configured for different
  142. UDP ports.
  143. Please note corosync uses two UDP ports mcastport (for mcast receives) and
  144. mcastport - 1 (for mcast sends).
  145. If you have multiple clusters on the same network using the same mcastaddr
  146. please configure the mcastports with a gap.
  147. .TP
  148. ttl (udp only)
  149. This specifies the Time To Live (TTL). If you run your cluster on a routed
  150. network then the default of "1" will be too small. This option provides
  151. a way to increase this up to 255. The valid range is 0..255.
  152. .PP
  153. .PP
  154. Within the
  155. .B totem
  156. directive, there are seven configuration options of which one is required,
  157. five are optional, and one is required when IPV6 is configured in the interface
  158. subdirective. The required directive controls the version of the totem
  159. configuration. The optional option unless using IPV6 directive controls
  160. identification of the processor. The optional options control secrecy and
  161. authentication, the network mode of operation and maximum network MTU
  162. field.
  163. .TP
  164. version
  165. This specifies the version of the configuration file. Currently the only
  166. valid version for this directive is 2.
  167. .TP
  168. clear_node_high_bit
  169. This configuration option is optional and is only relevant when no nodeid is
  170. specified. Some corosync clients require a signed 32 bit nodeid that is greater
  171. than zero however by default corosync uses all 32 bits of the IPv4 address space
  172. when generating a nodeid. Set this option to yes to force the high bit to be
  173. zero and therefore ensure the nodeid is a positive signed 32 bit integer.
  174. WARNING: Cluster behavior is undefined if this option is enabled on only
  175. a subset of the cluster (for example during a rolling upgrade).
  176. .TP
  177. crypto_model
  178. This specifies which cryptographic library should be used by knet.
  179. Supported values depend on the libknet build and on the installed
  180. cryptography libraries. Typically nss and openssl will be available
  181. but gcrypt and others could also be allowed.
  182. The default is nss.
  183. .TP
  184. crypto_hash
  185. This specifies which HMAC authentication should be used to authenticate all
  186. messages. Valid values are none (no authentication), md5, sha1, sha256,
  187. sha384 and sha512. Encrypted transmission is only supported for
  188. the knet transport.
  189. The default is none.
  190. .TP
  191. crypto_cipher
  192. This specifies which cipher should be used to encrypt all messages.
  193. Valid values are none (no encryption), aes256, aes192 and aes128.
  194. Enabling crypto_cipher, requires also enabling of crypto_hash. Encrypted
  195. transmission is only supported for the knet transport.
  196. The default is none.
  197. .TP
  198. secauth
  199. This implies crypto_cipher=aes256 and crypto_hash=sha256, unless those options
  200. are explicitly set. Encrypted transmission is only supported for the knet
  201. transport.
  202. The default is off.
  203. .TP
  204. keyfile
  205. This specifies the fully qualified path to the shared key used to
  206. authenticate and encrypt data used within the Totem protocol.
  207. The default is /etc/corosync/authkey.
  208. .TP
  209. key
  210. Shared key stored in configuration instead of authkey file. This option
  211. has lower precedence than keyfile option so it's
  212. used only when keyfile is not specified.
  213. Using this option is not recommended for security reasons.
  214. .TP
  215. link_mode
  216. This specifies the Kronosnet mode, which may be passive, active, or
  217. rr (round-robin).
  218. .B passive:
  219. the active link with the highest priority (highest number) will be used. If one or more
  220. links share the same priority the one with the lowest link ID will
  221. be used.
  222. .B active:
  223. All active links will be used simultaneously to send traffic.
  224. link priority is ignored.
  225. .B rr:
  226. Round-Robin policy. Each packet will be sent to the next active link in
  227. order.
  228. If only one interface directive is specified, passive is automatically chosen.
  229. The maximum number of interface directives that is allowed with Kronosnet
  230. is 8. For other transports it is 1.
  231. .TP
  232. netmtu
  233. This specifies maximum packet length sent by corosync. It's mainly for the UDPU
  234. (and UDP) transport, where it specifies the network maximum transmit size, but
  235. can be used also with the KNET transport, where it defines the maximum length of packets
  236. passed to the knet layer. To specify the network MTU manually for KNET, use the
  237. .B knet_mtu
  238. option.
  239. For UDPU (and UDP), setting this value beyond 1500, the regular frame MTU,
  240. requires ethernet devices that support large, or
  241. also called jumbo, frames. If any device in the network doesn't support large
  242. frames, the protocol will not operate properly. The hosts must also have their
  243. mtu size set from 1500 to whatever frame size is specified here.
  244. Please note while some NICs or switches claim large frame support, they support
  245. 9000 MTU as the maximum frame size including the IP header. Setting the netmtu
  246. and host MTUs to 9000 will cause totem to use the full 9000 bytes of the frame.
  247. Then Linux will add a 18 byte header moving the full frame size to 9018. As a
  248. result some hardware will not operate properly with this size of data. A netmtu
  249. of 8982 seems to work for the few large frame devices that have been tested.
  250. Some manufacturers claim large frame support when in fact they support frame
  251. sizes of 4500 bytes.
  252. When sending multicast traffic, if the network frequently reconfigures, chances are
  253. that some device in the network doesn't support large frames.
  254. Choose hardware carefully if intending to use large frame support.
  255. The default is 1500 for UDPU (and UDP) and 65536 for the KNET transport.
  256. .TP
  257. transport
  258. This directive controls the transport mechanism used.
  259. The default is knet. The transport type can also be set to udpu or udp.
  260. Only knet allows crypto or multiple interfaces per node.
  261. .TP
  262. cluster_name
  263. This specifies the name of cluster and it's used for automatic generating
  264. of multicast address.
  265. .TP
  266. config_version
  267. This specifies version of config file. This is converted to unsigned 64-bit int.
  268. By default it's 0. Option is used to prevent joining old nodes with not
  269. up-to-date configuration. If value is not 0, and node is going for first time
  270. (only for first time, join after split doesn't follow this rules)
  271. from single-node membership to multiple nodes membership, other nodes
  272. config_versions are collected. If current node config_version is not
  273. equal to highest of collected versions, corosync is terminated.
  274. .TP
  275. ip_version
  276. This specifies version of IP to ask DNS resolver for.
  277. The value can be one of
  278. .B ipv4
  279. (look only for an IPv4 address)
  280. ,
  281. .B ipv6
  282. (check only IPv6 address)
  283. ,
  284. .B ipv4-6
  285. (look for all address families and use first IPv4 address found in the list if there is such address,
  286. otherwise use first IPv6 address) and
  287. .B ipv6-4
  288. (look for all address families and use first IPv6 address found in the list if there is such address,
  289. otherwise use first IPv4 address).
  290. Default (if unspecified) is
  291. .B ipv6-4
  292. for knet and udpu transports and
  293. .B ipv4
  294. for udp.
  295. The knet transport supports IPv4 and IPv6 addresses concurrently,
  296. provided they are consistent on each link.
  297. Within the
  298. .B totem
  299. directive, there are several configuration options which are used to control
  300. the operation of the protocol. It is generally not recommended to change any
  301. of these values without proper guidance and sufficient testing. Some networks
  302. may require larger values if suffering from frequent reconfigurations. Some
  303. applications may require faster failure detection times which can be achieved
  304. by reducing the token timeout.
  305. .TP
  306. token
  307. This timeout is used directly or as a base for real token timeout calculation (explained in
  308. .B token_coefficient
  309. section). Token timeout specifies in milliseconds until a token loss is declared after not
  310. receiving a token. This is the time spent detecting a failure of a processor
  311. in the current configuration. Reforming a new configuration takes about 50
  312. milliseconds in addition to this timeout.
  313. For real token timeout used by totem it's possible to read cmap value of
  314. .B runtime.config.totem.token
  315. key.
  316. Be careful to use the same timeout values on each of the nodes in the cluster
  317. or unpredictable results may occur.
  318. The default is 3000 milliseconds.
  319. .TP
  320. token_warning
  321. Specifies the interval between warnings that the token has not been received. The
  322. value is a percentage of the token timeout and can be set to 0 to disable
  323. warnings.
  324. The default is 75%.
  325. .TP
  326. token_coefficient
  327. This value is used only when
  328. .B nodelist
  329. section is specified and contains at least 3 nodes. If so, real token timeout
  330. is then computed as token + (number_of_nodes - 2) * token_coefficient.
  331. This allows cluster to scale without manually changing token timeout
  332. every time new node is added. This value can be set to 0 resulting
  333. in effective removal of this feature.
  334. The default is 650 milliseconds.
  335. .TP
  336. token_retransmit
  337. This timeout specifies in milliseconds after how long before receiving a token
  338. the token is retransmitted. This will be automatically calculated if token
  339. is modified. It is not recommended to alter this value without guidance from
  340. the corosync community.
  341. The minimum is 30 milliseconds. If not set and error occur, make sure
  342. token / (token_retransmits_before_loss_const + 0.2) is more than 30.
  343. The default is 238 milliseconds for two nodes cluster. Three or more nodes reference
  344. .B token_coefficient.
  345. .TP
  346. knet_compression_model
  347. Type of compression used by Kronosnet. Supported values depend on
  348. the libknet build and on the installed compression libraries. Typically zlib and lz4 will be available
  349. but bzip2 and others could also be allowed. The default is 'none'.
  350. .TP
  351. knet_compression_threshold
  352. Tells knet to NOT compress any packets that are smaller than the value
  353. indicated. Default 100 bytes.
  354. Set to 0 to reset to the default.
  355. Set to 1 to compress everything.
  356. .TP
  357. knet_compression_level
  358. Many compression libraries allow tuning of compression parameters. For example
  359. 0 or 1 ... 9 are commonly used to determine the level of compression. This value
  360. is passed unmodified to the compression library so it is recommended to consult
  361. the library's documentation for more detailed information.
  362. .TP
  363. hold
  364. This timeout specifies in milliseconds how long the token should be held by
  365. the representative when the protocol is under low utilization. It is not
  366. recommended to alter this value without guidance from the corosync community.
  367. The default is 180 milliseconds.
  368. .TP
  369. token_retransmits_before_loss_const
  370. This value identifies how many token retransmits should be attempted before
  371. forming a new configuration. It is also used for token_retransmit
  372. and hold calculations.
  373. The default is 4 retransmissions.
  374. .TP
  375. join
  376. This timeout specifies in milliseconds how long to wait for join messages in
  377. the membership protocol.
  378. The default is 50 milliseconds.
  379. .TP
  380. send_join
  381. This timeout specifies in milliseconds an upper range between 0 and send_join
  382. to wait before sending a join message. For configurations with less than
  383. 32 nodes, this parameter is not necessary. For larger rings, this parameter
  384. is necessary to ensure the NIC is not overflowed with join messages on
  385. formation of a new ring. A reasonable value for large rings (128 nodes) would
  386. be 80msec. Other timer values must also change if this value is changed. Seek
  387. advice from the corosync mailing list if trying to run larger configurations.
  388. The default is 0 milliseconds.
  389. .TP
  390. consensus
  391. This timeout specifies in milliseconds how long to wait for consensus to be
  392. achieved before starting a new round of membership configuration. The minimum
  393. value for consensus must be 1.2 * token. This value will be automatically
  394. calculated at 1.2 * token if the user doesn't specify a consensus value.
  395. For two node clusters, a consensus larger than the join timeout but less than
  396. token is safe. For three node or larger clusters, consensus should be larger
  397. than token. There is an increasing risk of odd membership changes, which still
  398. guarantee virtual synchrony, as node count grows if consensus is less than
  399. token.
  400. The default is 3600 milliseconds.
  401. .TP
  402. merge
  403. This timeout specifies in milliseconds how long to wait before checking for
  404. a partition when no multicast traffic is being sent. If multicast traffic
  405. is being sent, the merge detection happens automatically as a function of
  406. the protocol.
  407. The default is 200 milliseconds.
  408. .TP
  409. downcheck
  410. This timeout specifies in milliseconds how long to wait before checking
  411. that a network interface is back up after it has been downed.
  412. The default is 1000 milliseconds.
  413. .TP
  414. fail_recv_const
  415. This constant specifies how many rotations of the token without receiving any
  416. of the messages when messages should be received may occur before a new
  417. configuration is formed.
  418. The default is 2500 failures to receive a message.
  419. .TP
  420. seqno_unchanged_const
  421. This constant specifies how many rotations of the token without any multicast
  422. traffic should occur before the hold timer is started.
  423. The default is 30 rotations.
  424. .TP
  425. heartbeat_failures_allowed
  426. [HeartBeating mechanism]
  427. Configures the optional HeartBeating mechanism for faster failure detection. Keep in
  428. mind that engaging this mechanism in lossy networks could cause faulty loss declaration
  429. as the mechanism relies on the network for heartbeating.
  430. So as a rule of thumb use this mechanism if you require improved failure in low to
  431. medium utilized networks.
  432. This constant specifies the number of heartbeat failures the system should tolerate
  433. before declaring heartbeat failure e.g 3. Also if this value is not set or is 0 then the
  434. heartbeat mechanism is not engaged in the system and token rotation is the method
  435. of failure detection
  436. The default is 0 (disabled).
  437. .TP
  438. max_network_delay
  439. [HeartBeating mechanism]
  440. This constant specifies in milliseconds the approximate delay that your network takes
  441. to transport one packet from one machine to another. This value is to be set by system
  442. engineers and please don't change if not sure as this effects the failure detection
  443. mechanism using heartbeat.
  444. The default is 50 milliseconds.
  445. .TP
  446. window_size
  447. This constant specifies the maximum number of messages that may be sent on one
  448. token rotation. If all processors perform equally well, this value could be
  449. large (300), which would introduce higher latency from origination to delivery
  450. for very large rings. To reduce latency in large rings(16+), the defaults are
  451. a safe compromise. If 1 or more slow processor(s) are present among fast
  452. processors, window_size should be no larger than 256000 / netmtu to avoid
  453. overflow of the kernel receive buffers. The user is notified of this by
  454. the display of a retransmit list in the notification logs. There is no loss
  455. of data, but performance is reduced when these errors occur.
  456. The default is 50 messages.
  457. .TP
  458. max_messages
  459. This constant specifies the maximum number of messages that may be sent by one
  460. processor on receipt of the token. The max_messages parameter is limited to
  461. 256000 / netmtu to prevent overflow of the kernel transmit buffers.
  462. The default is 17 messages.
  463. .TP
  464. miss_count_const
  465. This constant defines the maximum number of times on receipt of a token
  466. a message is checked for retransmission before a retransmission occurs. This
  467. parameter is useful to modify for switches that delay multicast packets
  468. compared to unicast packets. The default setting works well for nearly all
  469. modern switches.
  470. The default is 5 messages.
  471. .TP
  472. knet_pmtud_interval
  473. How often the knet PMTUd runs to look for network MTU changes.
  474. Value in seconds, default: 30
  475. .TP
  476. knet_mtu
  477. Switch between manual and automatic MTU discovery. A value of 0 means
  478. automatic, other values set a manual MTU.
  479. In a setup with multiple interfaces, please specify
  480. the lowest MTU of the selected interfaces.
  481. The default value is 0.
  482. .TP
  483. block_unlisted_ips
  484. Allow UDPU and KNET to drop packets from IP addresses that are not known
  485. (nodes which don't exist in the nodelist) to corosync.
  486. Value is yes or no.
  487. This feature is mainly to protect against the joining of nodes
  488. with outdated configurations after a cluster split.
  489. Another use case is to allow the atomic merge of two independent clusters.
  490. Changing the default value is not recommended, the overhead is tiny and
  491. an existing cluster may fail if corosync is started on an unlisted node
  492. with an old configuration.
  493. The default value is yes.
  494. .TP
  495. cancel_token_hold_on_retransmit
  496. Allows Corosync to hold token by representative when there is too much
  497. retransmit messages. This allows network to process increased load without
  498. overloading it. Used mechanism is same as described for
  499. .B hold
  500. directive.
  501. Some deployments may prefer to never hold token when there is
  502. retransmit messages. If so, option should be set to yes.
  503. The default value is no.
  504. .PP
  505. Within the
  506. .B logging
  507. directive, there are several configuration options which are all optional.
  508. .PP
  509. The following 3 options are valid only for the top level logging directive:
  510. .TP
  511. timestamp
  512. This specifies that a timestamp is placed on all log messages. It can be one
  513. of off (no timestamp), on (second precision timestamp) or
  514. hires (millisecond precision timestamp - only when supported by LibQB).
  515. The default is hires (or on if hires is not supported).
  516. .TP
  517. fileline
  518. This specifies that file and line should be printed.
  519. The default is off.
  520. .TP
  521. function_name
  522. This specifies that the code function name should be printed.
  523. The default is off.
  524. .TP
  525. blackbox
  526. This specifies that blackbox functionality should be enabled.
  527. The default is on.
  528. .PP
  529. The following options are valid both for top level logging directive
  530. and they can be overridden in logger_subsys entries.
  531. .TP
  532. to_stderr
  533. .TP
  534. to_logfile
  535. .TP
  536. to_syslog
  537. These specify the destination of logging output. Any combination of
  538. these options may be specified. Valid options are
  539. .B yes
  540. and
  541. .B no.
  542. The default is syslog and stderr.
  543. Please note, if you are using to_logfile and want to rotate the file, use logrotate(8)
  544. with the option
  545. .B
  546. copytruncate.
  547. eg.
  548. .ne 18
  549. .RS
  550. .nf
  551. .ft CW
  552. /var/log/corosync.log {
  553. missingok
  554. compress
  555. notifempty
  556. daily
  557. rotate 7
  558. copytruncate
  559. }
  560. .ft
  561. .fi
  562. .RE
  563. .TP
  564. logfile
  565. If the
  566. .B to_logfile
  567. directive is set to
  568. .B yes
  569. , this option specifies the pathname of the log file.
  570. No default.
  571. .TP
  572. logfile_priority
  573. This specifies the logfile priority for this particular subsystem. Ignored if debug is on.
  574. Possible values are: alert, crit, debug (same as debug = on), emerg, err, info, notice, warning.
  575. The default is: info.
  576. .TP
  577. syslog_facility
  578. This specifies the syslog facility type that will be used for any messages
  579. sent to syslog. options are daemon, local0, local1, local2, local3, local4,
  580. local5, local6 & local7.
  581. The default is daemon.
  582. .TP
  583. syslog_priority
  584. This specifies the syslog level for this particular subsystem. Ignored if debug is on.
  585. Possible values are: alert, crit, debug (same as debug = on), emerg, err, info, notice, warning.
  586. The default is: info.
  587. .TP
  588. debug
  589. This specifies whether debug output is logged for this particular logger. Also can contain
  590. value trace, what is highest level of debug information.
  591. The default is off.
  592. .PP
  593. Within the
  594. .B logging
  595. directive, logger_subsys directives are optional.
  596. .PP
  597. Within the
  598. .B logger_subsys
  599. sub-directive, all of the above logging configuration options are valid and
  600. can be used to override the default settings.
  601. The subsys entry, described below, is mandatory to identify the subsystem.
  602. .TP
  603. subsys
  604. This specifies the subsystem identity (name) for which logging is specified. This is the
  605. name used by a service in the log_init() call. E.g. 'CPG'. This directive is
  606. required.
  607. .PP
  608. Within the
  609. .B quorum
  610. directive it is possible to specify the quorum algorithm to use with the
  611. .TP
  612. provider
  613. directive. At the time of writing only corosync_votequorum is supported.
  614. See votequorum(5) for configuration options.
  615. .PP
  616. Within the
  617. .B nodelist
  618. directive it is possible to specify specific information about nodes in cluster. Directive
  619. can contain only
  620. .B node
  621. sub-directive, which specifies every node that should be a member of the membership, and where
  622. non-default options are needed. Every node must have at least ring0_addr field filled.
  623. Every node that should be a member of the membership must be specified.
  624. Possible options are:
  625. .TP
  626. ringX_addr
  627. This specifies IP or network hostname address of the particular node.
  628. X is a link number.
  629. .TP
  630. nodeid
  631. This configuration option is required for each node for Kronosnet mode.
  632. It is a 32 bit value specifying the node identifier delivered to the
  633. cluster membership service. The node identifier value of zero is
  634. reserved and should not be used. If knet is set, this field must be set.
  635. .TP
  636. name
  637. This option is used mainly with knet transport to identify local node.
  638. It's also used by client software (pacemaker).
  639. Algorithm for identifying local node is following:
  640. .RS
  641. .IP 1.
  642. Looks up $HOSTNAME in the nodelist
  643. .IP 2.
  644. If this fails strip the domain name from $HOSTNAME and looks up
  645. that in the nodelist
  646. .IP 3.
  647. If this fails look in the nodelist for a fully-qualified name whose
  648. short version matches the short version of $HOSTNAME
  649. .IP 4.
  650. If all this fails then search the interfaces list for an address that
  651. matches a name in the nodelist
  652. .RE
  653. .PP
  654. Within the
  655. .B system
  656. directive it is possible to specify system options.
  657. Possible options are:
  658. .TP
  659. qb_ipc_type
  660. This specifies type of IPC to use. Can be one of native (default), shm and socket.
  661. Native means one of shm or socket, depending on what is supported by OS. On systems
  662. with support for both, SHM is selected. SHM is generally faster, but need to allocate
  663. ring buffer file in /dev/shm.
  664. .TP
  665. sched_rr
  666. Should be set to yes (default) if corosync should try to set round robin realtime
  667. scheduling with maximal priority to itself. When setting of scheduler fails, fallback to set
  668. maximal priority.
  669. .TP
  670. priority
  671. Set priority of corosync process. Valid only when sched_rr is set to no.
  672. Can be ether numeric value with similar meaning as
  673. .BR nice (1)
  674. or
  675. .B max
  676. /
  677. .B min
  678. meaning maximal / minimal priority (so minimal / maximal nice value).
  679. .TP
  680. move_to_root_cgroup
  681. Can be one of
  682. .B yes
  683. (Corosync always moves itself to root cgroup),
  684. .B no
  685. (Corosync never tries to move itself to root cgroup) or
  686. .B auto
  687. (Corosync first checks if sched_rr is enabled, and if
  688. so, it tries to set round robin realtime scheduling with maximal priority to itself.
  689. If setting of priority fails, corosync tries to move itself to root
  690. cgroup and retries setting of priority).
  691. This feature is available only for systems with cgroups v1 with RT
  692. sched enabled (Linux with CONFIG_RT_GROUP_SCHED kernel option) and cgroups v2.
  693. It's worth noting that currently (May 3 2021) cgroup2 doesn’t yet
  694. support control of realtime processes and the cpu controller can only be
  695. enabled when all RT processes are in the root cgroup (applies only for kernel
  696. with CONFIG_RT_GROUP_SCHED enabled). So when move_to_root_cgroup
  697. is disabled, kernel is compiled with CONFIG_RT_GROUP_SCHED and systemd is used,
  698. it may be impossible to make systemd options
  699. like CPUQuota working correctly until corosync is stopped.
  700. Also when moving to root cgroup is enforced and used together with cgroup2 and systemd
  701. it makes impossible (most of the time) for journald to add systemd specific
  702. metadata (most importantly _SYSTEMD_UNIT) properly, because corosync is
  703. moved out of cgroup created by systemd. This means
  704. it is not possible to filter corosync logged messages based on these metadata
  705. (for example using -u or _SYSTEMD_UNIT=UNIT pattern) and also running
  706. systemctl status doesn't display (all) corosync log messages.
  707. The problem is even worse because journald caches pid for some time
  708. (approx. 5 sec) so initial corosync messages have correct metadata.
  709. .TP
  710. allow_knet_handle_fallback
  711. If knet handle creation fails using privileged operations, allow fallback to
  712. creating knet handle using unprivileged operations. Defaults to no, meaning
  713. if privileged knet handle creation fails, corosync will refuse to start.
  714. The knet handle will always be created using privileged operations if possible,
  715. setting this to yes only allows fallback to unprivileged operations. This fallback
  716. may result in performance issues, but if running in an unprivileged environment,
  717. e.g. as a normal user or in unprivileged container, this may be required.
  718. .TP
  719. state_dir
  720. Existing directory where corosync should chdir into. Corosync stores
  721. important state files and blackboxes there.
  722. The default is /var/lib/corosync.
  723. .PP
  724. Within the
  725. .B resources
  726. directive it is possible to specify options for resources.
  727. Possible option is:
  728. .TP
  729. watchdog_device
  730. (Valid only if Corosync was compiled with watchdog support.)
  731. .br
  732. Watchdog device to use, for example /dev/watchdog.
  733. If unset, empty or "off", no watchdog is used.
  734. .IP
  735. In a cluster with properly configured power fencing a watchdog
  736. provides no additional value. On the other hand, slow watchdog
  737. communication may incur multi-second delays in the Corosync main loop,
  738. potentially breaking down membership. IPMI watchdogs are particularly
  739. notorious in this regard: read about kipmid_max_busy_us in IPMI.txt in
  740. the Linux kernel documentation.
  741. .PP
  742. Within the
  743. .B nozzle
  744. directive it is possible to specify options for a libnozzle device. This is a pseudo
  745. ethernet device that routes network traffic through a channel on the corosync knet network
  746. (NOT cpg or any corosync internal service) to other nodes in the cluster. This allows
  747. applications to take advantage of knet features such as multipathing, automatic failover,
  748. link switching etc. Note that libnozzle is not a reliable transport, but you can tunnel TCP
  749. through it for reliable communications.
  750. .br
  751. libnozzle also supports optional interface up/down scripts that are kept under a
  752. /etc/corosync/updown.d/ directory. See the knet documentation for more information.
  753. .br
  754. Only one nozzle device is allowed.
  755. .br
  756. The nozzle stanza takes several options:
  757. .TP
  758. name
  759. The name of the network device to be created. On Linux this may be any name at all, other
  760. platforms have restrictions on the name.
  761. .TP
  762. ipaddr
  763. The IP address (IPv6 or IPv4) of the interface. The bottom part of this address will be replaced
  764. by the local node's nodeid in conjunction with ipprefix. so, eg
  765. ipaddr: 192.168.1.0
  766. ipprefix: 24
  767. will make nodeids 1,2,5 use IP addresses 192.168.1.1, 192.168.1.2 & 192.168.1.5.
  768. If a prefix length of 16 is used then the bottom two bytes will be filled in with nodeid numbers.
  769. IPv6 addresses must end in '::', the nodeid will be added after the two colons to make the
  770. local IP address.
  771. Only one IP address is currently supported in the corosync.conf file. Additional IP addresses
  772. can be added in the ifup script if necessary.
  773. .TP
  774. ipprefix
  775. specifies the IP address prefix for the nozzle device (see above)
  776. .TP
  777. macaddr
  778. Specifies the MAC address prefix for the nozzle device. As for the IP address, the bottom part
  779. of the MAC address will be filled in with the node id. In this case no prefix applies, the bottom
  780. two bytes of the MAC address will always be overwritten with the node id. So specifying
  781. macaddr: 54:54:12:24:12:12 on nodeid 1 will result in it having a MAC address of 54:54:12:24:00:01
  782. .SH "TO ADD A NEW NODE TO THE CLUSTER"
  783. For example to add a node with address 10.24.38.108 with nodeid 3. The node has the name NEW
  784. (in DNS or /etc/hosts) and is not currently running corosync. The current corosync.conf nodelist
  785. looks like this:
  786. .PP
  787. .nf
  788. .RS
  789. nodelist {
  790. node {
  791. nodeid: 1
  792. ring0_addr: 10.24.38.101
  793. name: node1
  794. }
  795. node {
  796. nodeid: 2
  797. ring0_addr: 10.24.38.102
  798. name: node2
  799. }
  800. }
  801. .RE
  802. .fi
  803. .PP
  804. Add a new entry for the node below the existing nodes. Node entries don't have
  805. to be in nodeid order, but it will help keep you sane. So the nodelist now looks like this:
  806. .PP
  807. .nf
  808. .RS
  809. nodelist {
  810. node {
  811. nodeid: 1
  812. ring0_addr: 10.24.38.101
  813. name: node1
  814. }
  815. node {
  816. nodeid: 2
  817. ring0_addr: 10.24.38.102
  818. name: node2
  819. }
  820. node {
  821. nodeid: 3
  822. ring0_addr: 10.24.38.108
  823. name: NEW
  824. }
  825. }
  826. .RE
  827. .fi
  828. .PP
  829. .PP
  830. This file must then be copied onto all three nodes - the existing two nodes, and the new one.
  831. On one of the existing corosync nodes, tell corosync to re-read the updated config file into memory:
  832. .PP
  833. .nf
  834. .RS
  835. corosync-cfgtool -R
  836. .RE
  837. .fi
  838. .PP
  839. This command only needs to be run on one node in the cluster. You may then start corosync on the NEW node
  840. and it should join the cluster. If this doesn't work as expected then check the communications between all
  841. three nodes is working, and check the syslog files on all nodes for more information. It's important to note
  842. that the key bit of information about a node failing to join might be on a different node than you expect.
  843. .SH "TO REMOVE A NODE FROM THE CLUSTER"
  844. This is the reverse procedure to 'Adding a node' above. First you need to shut down the node you will
  845. be removing from the cluster.
  846. .PP
  847. .nf
  848. .RS
  849. corosync-cfgtool -H
  850. .RE
  851. .fi
  852. .PP
  853. Then delete the nodelist stanza from corosync.conf and finally update corosync on the remaining nodes by
  854. running
  855. .PP
  856. .nf
  857. .RS
  858. corosync-cfgtool -R
  859. .RE
  860. .fi
  861. .TP
  862. on one of them.
  863. .SH "ADDRESS RESOLUTION"
  864. corosync resolves ringX_addr names/IP addresses using the getaddrinfo(3) call with respect
  865. of totem.ip_version setting.
  866. getaddrinfo() function uses a sophisticated algorithm to sort node addresses into a preferred
  867. order and corosync always chooses the first address in that list of the required family.
  868. As such it is essential that your DNS or /etc/hosts files are correctly configured so that
  869. all addresses for ringX appear on the same network (or are reachable with minimal hops)
  870. and over the same IP protocol. If this is not the case then some nodes might not be able
  871. to join the cluster. It is possible to override the search order used
  872. by getaddrinfo() using the configuration file /etc/gai.conf(5) if necessary,
  873. but this is not recommended.
  874. If there is any doubt about the order of addresses returned from getaddrinfo() then it might be simpler to use
  875. IP addresses (v4 or v6) in the ringX_addr field.
  876. .SH "FILES"
  877. .TP
  878. /etc/corosync/corosync.conf
  879. The corosync executive configuration file.
  880. .SH "SEE ALSO"
  881. .BR corosync_overview (7),
  882. .BR votequorum (5),
  883. .BR corosync-qdevice (8),
  884. .BR logrotate (8)
  885. .BR getaddrinfo (3)
  886. .BR gai.conf (5)
  887. .PP