box.ctl.make_bootstrap_leader()
Since: 3.0.0.
Make the instance a bootstrap leader of a replica set.
To be able to make the instance a bootstrap leader manually, the
effective bootstrap strategy should be supervised. This happens when
box.cfg{bootstrap_strategy = 'supervised'} is used or when the
replication.bootstrap_strategy
option in the YAML configuration is set to supervised or native.
When native is used, the configuration logic usually calls
box.ctl.make_bootstrap_leader() automatically.
In this case, the instances do not choose a bootstrap leader automatically but wait for it to be appointed manually. Configuration fails if no bootstrap leader is appointed during a replication.connect_timeout.
Parameters:
-
opts(table) — optional parameters. The following parameter is available:graceful(boolean) — iftrue, requests a graceful bootstrap. If there is no local database, the instance checks whether a bootstrap leader exists on the connected nodes and takes the role only if there is no bootstrap leader. If a local database already exists, the call does nothing. The default value isfalse.