|
1 | 1 | .. _changing_monitor_elections: |
2 | 2 |
|
3 | | -===================================== |
4 | | -Configure Monitor Election Strategies |
5 | | -===================================== |
| 3 | +======================================= |
| 4 | +Configuring Monitor Election Strategies |
| 5 | +======================================= |
6 | 6 |
|
7 | | -By default, the monitors will use the ``classic`` mode. We |
8 | | -recommend that you stay in this mode unless you have a very specific reason. |
| 7 | +By default, the monitors are in ``classic`` mode. We recommend staying in this |
| 8 | +mode unless you have a very specific reason. |
9 | 9 |
|
10 | | -If you want to switch modes BEFORE constructing the cluster, change |
11 | | -the ``mon election default strategy`` option. This option is an integer value: |
| 10 | +If you want to switch modes BEFORE constructing the cluster, change the ``mon |
| 11 | +election default strategy`` option. This option takes an integer value: |
12 | 12 |
|
13 | | -* 1 for "classic" |
14 | | -* 2 for "disallow" |
15 | | -* 3 for "connectivity" |
| 13 | +* ``1`` for ``classic`` |
| 14 | +* ``2`` for ``disallow`` |
| 15 | +* ``3`` for ``connectivity`` |
16 | 16 |
|
17 | | -Once your cluster is running, you can change strategies by running :: |
| 17 | +After your cluster has started running, you can change strategies by running a |
| 18 | +command of the following form: |
18 | 19 |
|
19 | 20 | $ ceph mon set election_strategy {classic|disallow|connectivity} |
20 | 21 |
|
21 | 22 | Choosing a mode |
22 | 23 | =============== |
23 | | -The modes other than classic provide different features. We recommend |
24 | | -you stay in classic mode if you don't need the extra features as it is |
25 | | -the simplest mode. |
26 | 24 |
|
27 | | -The disallow Mode |
28 | | -================= |
29 | | -This mode lets you mark monitors as disallowed, in which case they will |
30 | | -participate in the quorum and serve clients, but cannot be elected leader. You |
31 | | -may wish to use this if you have some monitors which are known to be far away |
32 | | -from clients. |
33 | | -You can disallow a leader by running: |
| 25 | +The modes other than ``classic`` provide specific features. We recommend staying |
| 26 | +in ``classic`` mode if you don't need these extra features because it is the |
| 27 | +simplest mode. |
| 28 | + |
| 29 | +.. _rados_operations_disallow_mode: |
| 30 | + |
| 31 | +Disallow Mode |
| 32 | +============= |
| 33 | + |
| 34 | +The ``disallow`` mode allows you to mark monitors as disallowed. Disallowed |
| 35 | +monitors participate in the quorum and serve clients, but cannot be elected |
| 36 | +leader. You might want to use this mode for monitors that are far away from |
| 37 | +clients. |
| 38 | + |
| 39 | +To disallow a monitor from being elected leader, run a command of the following |
| 40 | +form: |
34 | 41 |
|
35 | 42 | .. prompt:: bash $ |
36 | 43 |
|
37 | 44 | ceph mon add disallowed_leader {name} |
38 | 45 |
|
39 | | -You can remove a monitor from the disallowed list, and allow it to become |
40 | | -a leader again, by running: |
| 46 | +To remove a monitor from the disallowed list and allow it to be elected leader, |
| 47 | +run a command of the following form: |
41 | 48 |
|
42 | 49 | .. prompt:: bash $ |
43 | 50 |
|
44 | 51 | ceph mon rm disallowed_leader {name} |
45 | 52 |
|
46 | | -The list of disallowed_leaders is included when you run: |
| 53 | +To see the list of disallowed leaders, examine the output of the following |
| 54 | +command: |
47 | 55 |
|
48 | 56 | .. prompt:: bash $ |
49 | 57 |
|
50 | 58 | ceph mon dump |
51 | 59 |
|
52 | | -The connectivity Mode |
53 | | -===================== |
54 | | -This mode evaluates connection scores provided by each monitor for its |
55 | | -peers and elects the monitor with the highest score. This mode is designed |
56 | | -to handle network partitioning or *net-splits*, which may happen if your cluster |
57 | | -is stretched across multiple data centers or otherwise has a non-uniform |
58 | | -or unbalanced network topology. |
| 60 | +Connectivity Mode |
| 61 | +================= |
| 62 | + |
| 63 | +The ``connectivity`` mode evaluates connection scores that are provided by each |
| 64 | +monitor for its peers and elects the monitor with the highest score. This mode |
| 65 | +is designed to handle network partitioning (also called *net-splits*): network |
| 66 | +partitioning might occur if your cluster is stretched across multiple data |
| 67 | +centers or otherwise has a non-uniform or unbalanced network topology. |
59 | 68 |
|
60 | | -This mode also supports disallowing monitors from being the leader |
61 | | -using the same commands as above in disallow. |
| 69 | +The ``connectivity`` mode also supports disallowing monitors from being elected |
| 70 | +leader by using the same commands that were presented in :ref:`Disallow Mode <rados_operations_disallow_mode>`. |
62 | 71 |
|
63 | 72 | Examining connectivity scores |
64 | 73 | ============================= |
65 | | -The monitors maintain connection scores even if they aren't in |
66 | | -the connectivity election mode. You can examine the scores a monitor |
67 | | -has by running: |
| 74 | + |
| 75 | +The monitors maintain connection scores even if they aren't in ``connectivity`` |
| 76 | +mode. To examine a specific monitor's connection scores, run a command of the |
| 77 | +following form: |
68 | 78 |
|
69 | 79 | .. prompt:: bash $ |
70 | 80 |
|
71 | 81 | ceph daemon mon.{name} connection scores dump |
72 | 82 |
|
73 | | -Scores for individual connections range from 0-1 inclusive, and also |
74 | | -include whether the connection is considered alive or dead (determined by |
75 | | -whether it returned its latest ping within the timeout). |
| 83 | +Scores for an individual connection range from ``0`` to ``1`` inclusive and |
| 84 | +include whether the connection is considered alive or dead (as determined by |
| 85 | +whether it returned its latest ping before timeout). |
76 | 86 |
|
77 | | -While this would be an unexpected occurrence, if for some reason you experience |
78 | | -problems and troubleshooting makes you think your scores have become invalid, |
79 | | -you can forget history and reset them by running: |
| 87 | +Connectivity scores are expected to remain valid. However, if during |
| 88 | +troubleshooting you determine that these scores have for some reason become |
| 89 | +invalid, drop the history and reset the scores by running a command of the |
| 90 | +following form: |
80 | 91 |
|
81 | 92 | .. prompt:: bash $ |
82 | 93 |
|
83 | 94 | ceph daemon mon.{name} connection scores reset |
84 | 95 |
|
85 | | -While resetting scores has low risk (monitors will still quickly determine |
86 | | -if a connection is alive or dead, and trend back to the previous scores if they |
87 | | -were accurate!), it should also not be needed and is not recommended unless |
88 | | -requested by your support team or a developer. |
| 96 | +Resetting connectivity scores carries little risk: monitors will still quickly |
| 97 | +determine whether a connection is alive or dead and trend back to the previous |
| 98 | +scores if those scores were accurate. Nevertheless, resetting scores ought to |
| 99 | +be unnecessary and it is not recommended unless advised by your support team |
| 100 | +or by a developer. |
0 commit comments