4
0

cmap_keys.8 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  1. .\"/*
  2. .\" * Copyright (c) 2012-2014 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 3 main types of keys stored in CMAP:
  41. .PP
  42. * Mapping of values stored in the config file.
  43. .PP
  44. * Runtime statistics.
  45. .PP
  46. * Other user created values.
  47. In this man page, wild-cards have the usual meaning.
  48. .SH KEYS
  49. .TP
  50. internal_configuration.*
  51. Internal configuration data. All keys in this prefix are read only.
  52. It's only useful for getting a list of loaded services.
  53. .TP
  54. logging.*
  55. Values read from the configuration file. It's possible to change them at runtime.
  56. If subsystem specific configuration is needed, the key must be in the form
  57. logging.logger_subsys.SERVICE.key, where SERVICE is upper case name of the service and
  58. key is same as in the configuration file. All values are of string type.
  59. .TP
  60. nodelist.*
  61. Values read from the configuration file. Each node element in the configuration file gets
  62. assigned it's position starting from zero. So the first node from the config file has
  63. nodelist.node.0. prefix. To be a valid entry, each node must have
  64. .B ring0_addr
  65. key.
  66. To change the
  67. .B nodeid
  68. key, use a 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 the local node directly from cmap.
  73. .TP
  74. runtime.blackbox.*
  75. Trigger keys for storing fplay data. It's recommended that you the corosync-blackbox command
  76. to change keys in this prefix.
  77. .TP
  78. runtime.connections.*
  79. There is information about total number of active connections in given moment in the
  80. .B active
  81. key, number of closed connections during whole runtime of corosync in the
  82. .B closed
  83. key and information about each active IPC connection. All keys in this prefix are read-only.
  84. .TP
  85. runtime.connections.ID.*
  86. Each IPC connection has a unique ID. This is in the 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 this prefix are:
  89. .B client_pid
  90. containing PID of IPC connection (unavailable on some platforms).
  91. .B dispatched
  92. number of dispatched messages.
  93. .B invalid_request
  94. number of requests made by IPC which are invalid (calling non-existing call, ...).
  95. .B name
  96. contains short name of the 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 the number of messages in the queue waiting for send.
  101. .B recv_retries
  102. is the total number of interrupted receives.
  103. .B requests
  104. contains the number of requests made by IPC.
  105. .B responses
  106. is the number of responses sent to the IPC client.
  107. .B send_retries
  108. contains the total number of interrupted sends.
  109. .B service_id
  110. contains the ID of service which the IPC is connected to.
  111. .TP
  112. runtime.config.*
  113. Contains the values actually in use by the totem membership protocol.
  114. Values here are either taken from the Corosync configuration file,
  115. defaults or computed from entries in the config file. For information
  116. on individual keys please refer to the man page
  117. .BR corosync.conf (5).
  118. .TP
  119. runtime.services.*
  120. Prefix with statistics for service engines. Each service has it's own
  121. .B service_id
  122. key in the prefix with the name runtime.services.SERVICE., where SERVICE is the lower case
  123. name of the service. Inside the service prefix is the number of messages received and sent
  124. by the corosync engine in the format runtime.services.SERVICE.EXEC_CALL.rx and
  125. runtime.services.SERVICE.EXEC_CALL.tx, where EXEC_CALL is the internal id of the service
  126. call (so for example 3 in cpg service is receive of multicast message from other
  127. nodes).
  128. .TP
  129. runtime.totem.pg.mrp.srp.*
  130. Prefix containing statistics about totem. All keys here are read only.
  131. Typical key prefixes:
  132. .B commit_entered
  133. Number of times the processor entered COMMIT state.
  134. .B commit_token_lost
  135. Number of times the processor lost token in COMMIT state.
  136. .B consensus_timeouts
  137. How many times the processor timed out forming a consensus about membership.
  138. .B continuous_gather
  139. How many times the processor was not able to reach consensus.
  140. .B firewall_enabled_or_nic_failure
  141. Set to 1 when processor was not able to reach consensus for long time. The usual
  142. reason is a badly configured firewall or connection failure.
  143. .B gather_entered
  144. Number of times the processor entered GATHER state.
  145. .B gather_token_lost
  146. Number of times the processor lost token in GATHER state.
  147. .B mcast_retx
  148. Number of retransmitted messages.
  149. .B mcast_rx
  150. Number of received multicast messages.
  151. .B mcast_tx
  152. Number of transmitted multicast messages.
  153. .B memb_commit_token_rx
  154. Number of received commit tokens.
  155. .B memb_commit_token_tx
  156. Number of transmitted commit tokens.
  157. .B memb_join_rx
  158. Number of received join messages.
  159. .B memb_join_tx
  160. Number of transmitted join messages.
  161. .B memb_merge_detect_rx
  162. Number of received member merge messages.
  163. .B memb_merge_detect_tx
  164. Number of transmitted member merge messages.
  165. .B orf_token_rx
  166. Number of received orf tokens.
  167. .B orf_token_tx
  168. Number of transmitted orf tokens.
  169. .B recovery_entered
  170. Number of times the processor entered recovery.
  171. .B recovery_token_lost
  172. Number of times the token was lost in recovery state.
  173. .B rx_msg_dropped
  174. Number of received messages which were dropped because they were not expected
  175. (as example multicast message in commit state).
  176. .B token_hold_cancel_rx
  177. Number of received token hold cancel messages.
  178. .B token_hold_cancel_tx
  179. Number of transmitted token hold cancel messages.
  180. .B mtt_rx_token
  181. Mean transit time of token in milliseconds. In other words, time between
  182. two consecutive token receives.
  183. .B avg_token_workload
  184. Average time in milliseconds of holding time of token on the current processor.
  185. .B avg_backlog_calc
  186. Average number of not yet sent messages on the current processor.
  187. .TP
  188. runtime.totem.pg.mrp.srp.members.*
  189. Prefix containing members of the totem single ring protocol. Each member
  190. keys has format runtime.totem.pg.mrp.srp.members.NODEID.KEY, where key is
  191. one of:
  192. .B ip
  193. IP address of member. It's stored in format r(RING_ID) ip(IP_ADDRESS).
  194. .B join_count
  195. Number of times the processor joined membership with local cluster. When
  196. processor fails and rejoins again, this value is incremented.
  197. .B status
  198. Status of the processor. Can be one of joined and left.
  199. .B config_version
  200. Config version of the member node.
  201. .TP
  202. runtime.schedmiss.*
  203. If corosync is not scheduled after the required period of time it will
  204. log this event and also write an entry to cmap under following keys:
  205. .B timestamp
  206. The timestamp of the last time when corosync failed to be scheduled
  207. for the required amount of time. The time is milli-seconds since the epoch.
  208. .B delay
  209. The amount of time (milliseconds as a float) that corosync was delayed.
  210. .TP
  211. resources.process.PID.*
  212. Prefix created by applications using SAM with CMAP integration.
  213. It contains the following keys:
  214. .B recovery
  215. Recovery policy of the process. Can be one of quit or restart.
  216. .B poll_period
  217. Value passed in sam_initialize as a time_interval.
  218. .B last_updated
  219. Last time SAM received a heartbeat from the client.
  220. .B state
  221. State of the client. Can be one of failed, stopped, running and waiting for quorum.
  222. .TP
  223. uidgid.*
  224. Information about users/groups which are allowed to make IPC connections to
  225. corosync. Entries loaded from configuration file are stored with
  226. uidgid.config.* prefix and are pruned on configuration file reload. Dynamic
  227. entries has uidgid.* prefix and a configuration file reload doesn't affect them.
  228. .TP
  229. quorum.cancel_wait_for_all
  230. Tells votequorum to cancel waiting for all nodes at cluster startup. Can be used
  231. to unblock quorum if notes are known to be down. For pcs use only.
  232. .TP
  233. config.reload_in_progress
  234. This value will be set to 1 (or created) when a corosync.conf reload is started,
  235. and set to 0 when the reload is completed. This allows interested subsystems
  236. to do atomic reconfiguration rather than changing each key. Note that
  237. individual add/change/delete notifications will still be sent during a reload.
  238. .TP
  239. config.totemconfig_reload_in_progress
  240. This key is similar to
  241. .B config.totemconfig_reload_in_progress
  242. but changed after the totem config trigger is processed. It is useful (mainly)
  243. for situations when
  244. .B nodelist.local_node_pos
  245. must be correctly reinstated before anything else.
  246. .SH DYNAMIC CHANGE USER/GROUP PERMISSION TO USE COROSYNC IPC
  247. Is the same as in the configuration file. eg: to add UID 500 use
  248. .br
  249. # corosync-cmapctl -s uidgid.uid.500 u8 1
  250. GID is similar, so to add a GID use
  251. .br
  252. # corosync-cmapctl -s uidgid.gid.500 u8 1
  253. For removal of permissions, simply delete the key
  254. .br
  255. # corosync-cmapctl -d uidgid.gid.500
  256. .SH DYNAMIC ADD/REMOVE OF UDPU NODE
  257. Eg. To add the node with address 10.34.38.108
  258. and nodeid 3. This node is called NEW and it's not running corosync yet.
  259. .PP
  260. * Find a node position in the node list which is not used yet. It's recommended that you
  261. use highest_number + 1. Let's say output of corosync-cmapctl looks like:
  262. .br
  263. nodelist.local_node_pos (u32) = 1
  264. .br
  265. nodelist.node.0.nodeid (u32) = 1
  266. .br
  267. nodelist.node.0.ring0_addr (str) = 10.34.38.106
  268. .br
  269. nodelist.node.1.nodeid (u32) = 2
  270. .br
  271. nodelist.node.1.ring0_addr (str) = 10.34.38.107
  272. So next node position will be 2.
  273. .PP
  274. * Add all entries needed for the node on all running nodes, as:
  275. .br
  276. # corosync-cmapctl -s nodelist.node.2.nodeid u32 3
  277. .br
  278. # corosync-cmapctl -s nodelist.node.2.ring0_addr str 10.34.38.108
  279. Always add the ring0_addr key last. The Corosync engine on all nodes should reply
  280. with
  281. .I notice [TOTEM ] adding new UDPU member {10.34.38.108}
  282. message.
  283. .PP
  284. * Add node information to the configuration file on all nodes so that it
  285. will survive a restart of corosync.
  286. .PP
  287. * Copy and edit configuration file to the NEW node.
  288. .PP
  289. * Start corosync on the NEW node.
  290. Removal of a UDPU node is a very similar, slightly reversed action, so
  291. .PP
  292. * Stop corosync on the OLD node.
  293. .PP
  294. * Remove the relevant entries from cmap on all nodes.
  295. .PP
  296. * Change the configuration file on all nodes.
  297. .SH "SEE ALSO"
  298. .BR corosync_overview (8),
  299. .BR corosync.conf (5),
  300. .BR corosync-cmapctl (8)