Skip to content

Commit 5ffa007

Browse files
committed
'supervised' bootstrap strategy
1 parent b837702 commit 5ffa007

File tree

4 files changed

+37
-4
lines changed

4 files changed

+37
-4
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# replication.bootstrap_strategy
2+
3+
A sample application demonstrating how to use the specified instance to bootstrap a replica set.
4+
5+
## Running
6+
7+
To start all instances, execute the following command in the [replication](../../../replication) directory:
8+
9+
```console
10+
$ tt start bootstrap_strategy
11+
```

doc/reference/configuration/configuration_reference.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -933,9 +933,7 @@ The ``replication`` section defines configuration parameters related to :ref:`re
933933
* ``config``: use the specified node to bootstrap a replica set.
934934
To specify the bootstrap leader, use the :ref:`<replicaset_name>.bootstrap_leader <configuration_reference_replicasets_name_bootstrap_leader>` option.
935935

936-
* ``supervised``: a bootstrap leader isn't chosen automatically but should be appointed using ``box.ctl.make_bootstrap_leader()`` on the desired node.
937-
938-
Configuration fails if no bootstrap leader is appointed during a :ref:`replication.connect_timeout <configuration_reference_replication_connect_timeout>`.
936+
* ``supervised``: a bootstrap leader isn't chosen automatically but should be appointed using :ref:`box.ctl.make_bootstrap_leader() <box_ctl-make_bootstrap_leader>` on the desired node.
939937

940938
* ``legacy`` (deprecated since :doc:`2.11.0 </release/2.11.0>`): a node requires the :ref:`replication_connect_quorum <cfg_replication-replication_connect_quorum>` number of other nodes to be connected.
941939
This option is added to keep the compatibility with the current versions of Cartridge and might be removed in the future.

doc/reference/reference_lua/box_ctl.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Below is a list of all ``box.ctl`` functions.
2626
.. rst-class:: left-align-column-2
2727

2828
.. list-table::
29-
:widths: 25 75
29+
:widths: 35 65
3030
:header-rows: 1
3131

3232
* - Name
@@ -62,6 +62,9 @@ Below is a list of all ``box.ctl`` functions.
6262
* - :doc:`./box_ctl/demote`
6363
- Revoke the leader role from the instance
6464

65+
* - :doc:`./box_ctl/make_bootstrap_leader`
66+
- Make the instance a bootstrap leader of a replica set
67+
6568
.. toctree::
6669
:hidden:
6770

@@ -75,3 +78,4 @@ Below is a list of all ``box.ctl`` functions.
7578
box_ctl/is_recovery_finished
7679
box_ctl/promote
7780
box_ctl/demote
81+
box_ctl/make_bootstrap_leader
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.. _box_ctl-make_bootstrap_leader:
2+
3+
box.ctl.make_bootstrap_leader()
4+
===============================
5+
6+
.. function:: make_bootstrap_leader()
7+
8+
**Since:** :doc:`3.0.0 </release/3.0.0>`.
9+
10+
Make the instance a bootstrap leader of a :ref:`replica set <replication-bootstrap>`.
11+
12+
To be able to make the instance a bootstrap leader manually, the :ref:`replication.bootstrap_strategy <configuration_reference_replication_bootstrap_strategy>` configuration option should be set to ``supervised``.
13+
In this case, the instances do not choose a bootstrap leader automatically but wait for it to be appointed manually.
14+
Configuration fails if no bootstrap leader is appointed during a :ref:`replication.connect_timeout <configuration_reference_replication_connect_timeout>`.
15+
16+
.. NOTE::
17+
18+
When a new instance joins a replica set configured with the ``supervised`` bootstrap strategy,
19+
this instance doesn't choose the bootstrap leader automatically but joins to the instance on which
20+
``box.ctl.make_bootstrap_leader()`` was executed last time.

0 commit comments

Comments
 (0)