Skip to content

Commit 0201269

Browse files
authored
Merge pull request ceph#51992 from zdover23/wip-doc-2023-06-10-rados-operations-change-mon-elections
doc/rados: edit change-mon-elections Reviewed-by: Anthony D'Atri <[email protected]>
2 parents 9f217cf + dc93181 commit 0201269

File tree

1 file changed

+58
-46
lines changed

1 file changed

+58
-46
lines changed
Lines changed: 58 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,100 @@
11
.. _changing_monitor_elections:
22

3-
=====================================
4-
Configure Monitor Election Strategies
5-
=====================================
3+
=======================================
4+
Configuring Monitor Election Strategies
5+
=======================================
66

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.
99

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:
1212

13-
* 1 for "classic"
14-
* 2 for "disallow"
15-
* 3 for "connectivity"
13+
* ``1`` for ``classic``
14+
* ``2`` for ``disallow``
15+
* ``3`` for ``connectivity``
1616

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:
1819

1920
$ ceph mon set election_strategy {classic|disallow|connectivity}
2021

2122
Choosing a mode
2223
===============
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.
2624

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:
3441

3542
.. prompt:: bash $
3643

3744
ceph mon add disallowed_leader {name}
3845

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:
4148

4249
.. prompt:: bash $
4350

4451
ceph mon rm disallowed_leader {name}
4552

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:
4755

4856
.. prompt:: bash $
4957

5058
ceph mon dump
5159

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.
5968

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>`.
6271

6372
Examining connectivity scores
6473
=============================
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:
6878

6979
.. prompt:: bash $
7080

7181
ceph daemon mon.{name} connection scores dump
7282

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).
7686

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:
8091

8192
.. prompt:: bash $
8293

8394
ceph daemon mon.{name} connection scores reset
8495

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

Comments
 (0)