Description
Related dev. issue(s): tarantool/tarantool#8509
Product: Tarantool
Since: 3.0.0-alpha3
Root document: https://www.tarantool.io/en/doc/latest/reference/configuration/#cfg-replication-bootstrap-strategy
SME: @ sergepetrenko
Details
The bootstrap_strategy
configuration option may now be set to
"supervised".
This strategy works as follows:
When bootstrapping a new replicaset, the nodes do not choose a bootstrap
leader automatically and instead wait for it to be appointed by the
user. The configuration will fail if no bootstrap leader is appointed
during a replication_connect_timeout
.
In order to appoint a bootstrap leader, the user has to issue
box.ctl.make_bootstrap_leader()
call on the desired node. This must be
done during the initial box.cfg()
call.
Possible ways to achieve this are:
- In interactive mode:
fiber.create(box.cfg, desired_config)
box.ctl.make_bootstrap_leader()
- Via an init script:
-- Init script:
console.listen(admin_port)
box.cfg(desired_config)
-- User console:
tarantoolctl enter admin port
> box.ctl.make_bootstrap_leader()
When joining a new replica with bootstrap_strategy
= "supervised" to
an existing replica set, the replica will not choose the bootstrap
leader automatically, but will instead join to the node on which
box.ctl.make_bootstrap_leader()
was issued last. In case such a node
isn't found after a replication_connect_timeout
, the configuration
fails.
Requested by @sergepetrenko in tarantool/tarantool@c419cab