cmap_keys.8 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. .\"/*
  2. .\" * Copyright (c) 2012 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 the 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 "CMAP_KEYS" 8 "10/10/2012" "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
  35. .SH NAME
  36. .P
  37. cmap_keys \- Overview of keys stored in the Configuration Map
  38. .SH OVERVIEW
  39. .P
  40. There are roughly 3 types of keys stored in CMAP:
  41. .PP
  42. * Mapping of values stored in config file.
  43. .PP
  44. * Runtime statistics.
  45. .PP
  46. * Other user created values.
  47. In this man page, wild-cards are used with usual meaning.
  48. .SH KEYS
  49. .TP
  50. internal_configuration.*
  51. Internal configuration data. This keys (whole prefix) is read only.
  52. It's only useful for getting list of loaded services.
  53. .TP
  54. logging.*
  55. Values read from configuration file. It's possible to change them at runtime.
  56. If subsystem specific configuration is needed, key must be in form
  57. logging.logger_subsys.SERVICE.key, where SERVICE is upper case name of service and
  58. key is same as in configuration file. All values are of string type.
  59. .TP
  60. nodelist.*
  61. Values read from configuration file. Each node element in configuration file gets
  62. assigned it's position starting from zero. So first node from config file has
  63. nodelist.node.0. prefix. To be valid entry, each node must have
  64. .B ring0_addr
  65. key.
  66. For change of
  67. .B nodeid
  68. key, use u32 data type.
  69. Local node position is stored in
  70. .B local_node_pos
  71. key (RO), so it's easy to find
  72. out nodeid/ring addresses of local node directly from cmap.
  73. .TP
  74. runtime.blackbox.*
  75. Trigger keys for store fplay data. It's recommended to use corosync-blackbox command
  76. to change keys in this prefix.
  77. .TP
  78. runtime.connections.*
  79. There are informations about total number of active connections in given moment in
  80. .B active
  81. key, number of closed connections during whole runtime of corosync in
  82. .B closed
  83. key and informations about each active IPC connection. All keys in this prefix are read-only.
  84. .TP
  85. runtime.connections.ID.*
  86. Each IPC connection has unique ID. This is in form [[short_name:][PID:]internal_id. On some
  87. platforms, short_name and PID are not filled and only internal_id is used.
  88. Typical keys in prefix are:
  89. .B client_pid
  90. containing PID of IPC connection (unavailable on some platforms).
  91. .B dispatched
  92. with number of dispatched messages.
  93. .B invalid_request
  94. is number of requests made by IPC which are invalid (calling non-existing call, ...).
  95. .B name
  96. containing short name of IPC connection (unavailable on some platforms).
  97. .B overload
  98. is number of requests which were not processed because of overload.
  99. .B queue_size
  100. contains number of messages in queue waiting for send.
  101. .B recv_retries
  102. is total number of interrupted receives.
  103. .B requests
  104. contains number of requests made by IPC.
  105. .B responses
  106. is number of responses sent to IPC client.
  107. .B send_retries
  108. contains total number of interrupted sends.
  109. .B service_id
  110. contains ID of service which IPC is connected to.
  111. .TP
  112. runtime.services.*
  113. Prefix with statistics for service engines. Each service has it's own
  114. .B service_id
  115. key in prefix with name runtime.services.SERVICE., where SERVICE is lower case
  116. name of service. Inside service prefix is number of received and send messages
  117. by corosync engine in format runtime.services.SERVICE.EXEC_CALL.rx and
  118. runtime.services.SERVICE.EXEC_CALL.tx, where EXEC_CALL is internal id of service
  119. call (so for example 3 in cpg service is receive of multicast message from other
  120. nodes).
  121. .TP
  122. runtime.totem.pg.mrp.srp.*
  123. Prefix with statistics about totem. All keys there are read only.
  124. Typical key prefixes:
  125. .B commit_entered
  126. Number of times processor entered COMMIT state.
  127. .B commit_token_lost
  128. Number of times processor lost token in COMMIT state.
  129. .B consensus_timeouts
  130. How many times processor timeouted making consensus about membership.
  131. .B continuous_gather
  132. How many times was processor not able to reach consensus.
  133. .B firewall_enabled_or_nic_failure
  134. Set to 1 when processor was not able to reach consensus for long time. Usual
  135. reason is badly configured firewall or connection failure.
  136. .B gather_entered
  137. Number of times processor entered GATHER state.
  138. .B gather_token_lost
  139. Number of times processor lost token in GATHER state.
  140. .B mcast_retx
  141. Number of retransmitted messages.
  142. .B mcast_rx
  143. Number of received multicast messages.
  144. .B mcast_tx
  145. Number of transmitted multicast messages.
  146. .B memb_commit_token_rx
  147. Number of received commit tokens.
  148. .B memb_commit_token_tx
  149. Number of transmitted commit tokens.
  150. .B memb_join_rx
  151. Number of received join messages.
  152. .B memb_join_tx
  153. Number of transmitted join messages.
  154. .B memb_merge_detect_rx
  155. Number of received member merge messages.
  156. .B memb_merge_detect_tx
  157. Number of transmitted member merge messages.
  158. .B orf_token_rx
  159. Number of received orf tokens.
  160. .B orf_token_tx
  161. Number of transmitted orf tokens.
  162. .B recovery_entered
  163. Number of times processor entered recovery.
  164. .B recovery_token_lost
  165. Number of times token was lost in recovery state.
  166. .B rx_msg_dropped
  167. Number of received messages which was dropped because they were not expected
  168. (as example multicast message in commit state).
  169. .B token_hold_cancel_rx
  170. Number of received token hold cancel messages.
  171. .B token_hold_cancel_tx
  172. Number of transmitted token hold cancel messages.
  173. .B mtt_rx_token
  174. Mean transit time of token in milliseconds. In other words, time between
  175. two consecutive token receives.
  176. .B avg_token_workload
  177. Average time in milliseconds of holding time of token on current processor.
  178. .B avg_backlog_calc
  179. Average number of not yet sent messages of current processor.
  180. .TP
  181. runtime.totem.pg.mrp.srp.members.*
  182. Prefix containing members of totem single ring protocol. Each member
  183. keys has format runtime.totem.pg.mrp.srp.members.NODEID.KEY, where key is
  184. one of:
  185. .B ip
  186. IP address of member. It's stored in format r(RING_ID) ip(IP_ADDRESS).
  187. .B join_count
  188. Number of times processor joined membership with local processor. When
  189. processor fails and rejoins again, this value is incremented.
  190. .B status
  191. Status of processor. Can be one of joined and left.
  192. .B config_version
  193. Config version of member node.
  194. .TP
  195. resources.process.PID.*
  196. Prefix created by applications using SAM with CMAP integration.
  197. It contains following keys:
  198. .B recovery
  199. Recovery policy of process. Can be one of quit or restart.
  200. .B poll_period
  201. Value passed in sam_initialize as time_interval.
  202. .B last_updated
  203. Last time when SAM received heartbeat from client.
  204. .B state
  205. State of client. Can be one of failed, stopped, running and waiting for quorum.
  206. .TP
  207. uidgid.*
  208. Informations about users/groups which are allowed to do IPC connection to
  209. corosync.
  210. .SH DYNAMIC CHANGE USER/GROUP PERMISSION TO USE COROSYNC IPC
  211. Is very same as in configuration file. To add UID 500 use
  212. .br
  213. # corosync-cmapctl -s uidgid.uid.500 u8 1
  214. GID is similar, so to add GID use
  215. .br
  216. # corosync-cmapctl -s uidgid.gid.500 u8 1
  217. For removal of permission, simply delete key
  218. .br
  219. # corosync-cmapctl -d uidgid.gid.500
  220. .SH DYNAMIC ADD/REMOVE OF UDPU NODE
  221. We will need to add node with address 10.34.38.108
  222. and nodeid 3. This node is called NEW and it's not running corosync yet.
  223. .PP
  224. * Find a node position in node list which is not used yet. It's recommended to
  225. use highest_number + 1. Let's say output of corosync-cmapctl looks like:
  226. .br
  227. nodelist.local_node_pos (u32) = 1
  228. .br
  229. nodelist.node.0.nodeid (u32) = 1
  230. .br
  231. nodelist.node.0.ring0_addr (str) = 10.34.38.106
  232. .br
  233. nodelist.node.1.nodeid (u32) = 2
  234. .br
  235. nodelist.node.1.ring0_addr (str) = 10.34.38.107
  236. So next node position will be 2.
  237. .PP
  238. * Add all entries needed for node on all running nodes, as:
  239. .br
  240. # corosync-cmapctl -s nodelist.node.2.nodeid u32 3
  241. .br
  242. # corosync-cmapctl -s nodelist.node.2.ring0_addr str 10.34.38.108
  243. Always add ring0_addr key as last. Corosync engine on all nodes should reply
  244. with
  245. .I notice [TOTEM ] adding new UDPU member {10.34.38.108}
  246. message.
  247. .PP
  248. * Add node information to configuration file on all nodes so it
  249. will survive restart of corosync.
  250. .PP
  251. * Copy and edit configuration file to NEW node.
  252. .PP
  253. * Start corosync on NEW node.
  254. Removal of UDPU node is very similar slightly reversed action, so
  255. .PP
  256. * Stop corosync old OLD node.
  257. .PP
  258. * Remove relevant entries from cmap on all nodes.
  259. .PP
  260. * Change configuration file on all nodes.
  261. .SH "SEE ALSO"
  262. .BR corosync_overview (8),
  263. .BR corosync.conf (5),
  264. .BR corosync-cmapctl (8)