Skip to content

new configuration option - bootstrap_leader. #3432

Closed
@TarantoolBot

Description

@TarantoolBot

Related dev. issue(s): tarantool/tarantool#7999

Product: Tarantool
Since: 3.0
Root document:

SME: @ sergepetrenko

Details

Configuration receives a new parameter - bootstrap_leader. The
parameter specifies the desired node to bootstrap from.

The parameter is valid only when another option - bootstrap_strategy -
is set to 'config'.
The user may pass either the bootstrap leader's URI or its UUID string.

If bootstrap leader is passed as a UUID, the node will bootstrap from
the peer whose UUID matches the given one.

If bootstrap leader is passed as a URI, the URI must contain the same
host:port pair (or unix socket path) used for this node in
box.cfg.replication. In this case the node will bootstrap from the
remote peer listed in the corresponding replication entry.

For example, this call will return an error:

box.cfg{
    bootstrap_strategy = 'config',
    bootstrap_leader = 'localhost:3301',
    replication = {'127.0.0.1:3301'},
}

But this call will succeed:

box.cfg{
    bootstrap_strategy = 'config',
    bootstrap_leader = 127.0.0.1:3301',
    replication = {'127.0.0.1:3301'},
}

In the example above, setting either or both of bootstrap_leader and
replication to "user:password@127.0.0.1:3301 will work just fine,
i.e. only the bootstrap leader's host and port are matched against
replication entries.

If bootstrap_leader points at the instance being configured, the same
URI entry for the instance must still be present in replication
configuration parameter, like this:

box.cfg{
    listen = 'localhost:1234',
    bootstrap_leader = 'localhost:1234',
    replication = {'localhost:1234', ...},
}

The only exception to this is setting bootstrap_leader to the same
UUID as instance_uuid, like this:

box.cfg{
    listen = 'something',
    bootstrap_leader = '11111111-1111-1111-1111-111111111111',
    instance_uuid = '11111111-1111-1111-1111-111111111111',

In this case the node will bootstrap the cluster on its own.
Requested by @ sergepetrenko in tarantool/tarantool@c68fe03.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions