Skip to content

new configuration option - bootstrap_leader. #3432

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TarantoolBot opened this issue Apr 5, 2023 · 1 comment · Fixed by #3834
Closed

new configuration option - bootstrap_leader. #3432

TarantoolBot opened this issue Apr 5, 2023 · 1 comment · Fixed by #3834
Assignees

Comments

@TarantoolBot
Copy link
Collaborator

TarantoolBot commented Apr 5, 2023

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:[email protected]: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.

sergepetrenko added a commit to sergepetrenko/tarantool that referenced this issue Jun 1, 2023
Make it possible to specify the bootstrap leader via an instance name in
addition to its URI and UUID.

Closes tarantool#8539

@TarantoolBot document
Title: `box.cfg.bootstrap_leader` accepts instance names now

The option `box.cfg.bootstrap_leader`, which specifies the desired
bootstrap leader when bootstrap_strategy is "config" now accepts
instance names.

For example, this is a valid config without replication:
```lua
box.cfg{
    instance_name = 'main-server',
    bootstrap_strategy = 'config',
    bootstrap_leader = 'main-server'
}
```

When `box.cfg` contains some entries in `replication`, the node will
bootstrap from whatever node which has its `box.cfg.instance_name` set
to the same value as specified in `box.cfg.bootstrap_leader`.

This is an addition to tarantool/doc#3432
sergepetrenko added a commit to sergepetrenko/tarantool that referenced this issue Jun 1, 2023
Make it possible to specify the bootstrap leader via an instance name in
addition to its URI and UUID.

Closes tarantool#8539

@TarantoolBot document
Title: `box.cfg.bootstrap_leader` accepts instance names now

The option `box.cfg.bootstrap_leader`, which specifies the desired
bootstrap leader when bootstrap_strategy is "config" now accepts
instance names.

For example, this is a valid config without replication:
```lua
box.cfg{
    instance_name = 'main-server',
    bootstrap_strategy = 'config',
    bootstrap_leader = 'main-server'
}
```

When `box.cfg` contains some entries in `replication`, the node will
bootstrap from whatever node which has an instance name specified in
`box.cfg.bootstrap_leader`.

This is an addition to tarantool/doc#3432
sergepetrenko added a commit to sergepetrenko/tarantool that referenced this issue Jun 1, 2023
Make it possible to specify the bootstrap leader via an instance name in
addition to its URI and UUID.

Closes tarantool#8539

@TarantoolBot document
Title: `box.cfg.bootstrap_leader` accepts instance names now

The option `box.cfg.bootstrap_leader`, which specifies the desired
bootstrap leader when bootstrap_strategy is "config" now accepts
instance names.

For example, this is a valid config without replication:
```lua
box.cfg{
    instance_name = 'main-server',
    bootstrap_strategy = 'config',
    bootstrap_leader = 'main-server'
}
```

When `box.cfg` contains some entries in `replication`, the node will
bootstrap from whatever node which has an instance name specified in
`box.cfg.bootstrap_leader`.

This is an addition to tarantool/doc#3432
sergepetrenko added a commit to sergepetrenko/tarantool that referenced this issue Jun 1, 2023
Make it possible to specify the bootstrap leader via an instance name in
addition to its URI and UUID.

Closes tarantool#8539

@TarantoolBot document
Title: `box.cfg.bootstrap_leader` accepts instance names now

The option `box.cfg.bootstrap_leader`, which specifies the desired
bootstrap leader when bootstrap_strategy is "config" now accepts
instance names.

For example, this is a valid config without replication:
```lua
box.cfg{
    instance_name = 'main-server',
    bootstrap_strategy = 'config',
    bootstrap_leader = 'main-server'
}
```

When `box.cfg` contains some entries in `replication`, the node will
bootstrap from the node which has the instance name specified in
`box.cfg.bootstrap_leader`.

This is an addition to tarantool/doc#3432
sergepetrenko added a commit to sergepetrenko/tarantool that referenced this issue Jun 2, 2023
Make it possible to specify the bootstrap leader via an instance name in
addition to its URI and UUID.

Closes tarantool#8539

@TarantoolBot document
Title: `box.cfg.bootstrap_leader` accepts instance names now

The option `box.cfg.bootstrap_leader`, which specifies the desired
bootstrap leader when bootstrap_strategy is "config" now accepts
instance names.

For example, this is a valid config without replication:
```lua
box.cfg{
    instance_name = 'main-server',
    bootstrap_strategy = 'config',
    bootstrap_leader = 'main-server'
}
```

When `box.cfg` contains some entries in `replication`, the node will
bootstrap from the node which has the instance name specified in
`box.cfg.bootstrap_leader`.

This is an addition to tarantool/doc#3432
sergepetrenko added a commit to sergepetrenko/tarantool that referenced this issue Jun 2, 2023
Make it possible to specify the bootstrap leader via an instance name in
addition to its URI and UUID.

Closes tarantool#8539

@TarantoolBot document
Title: `box.cfg.bootstrap_leader` accepts instance names now

The option `box.cfg.bootstrap_leader`, which specifies the desired
bootstrap leader when bootstrap_strategy is "config" now accepts
instance names.

For example, this is a valid config without replication:
```lua
box.cfg{
    instance_name = 'main-server',
    bootstrap_strategy = 'config',
    bootstrap_leader = 'main-server'
}
```

When `box.cfg` contains some entries in `replication`, the node will
bootstrap from the node which has the instance name specified in
`box.cfg.bootstrap_leader`.

This is an addition to tarantool/doc#3432
sergepetrenko added a commit to sergepetrenko/tarantool that referenced this issue Jun 6, 2023
Make it possible to specify the bootstrap leader via an instance name in
addition to its URI and UUID.

While I'm at it, change the argument order of box_check_node_name() to
comply with box_check_uuid/uri/uri_set().

Closes tarantool#8539

@TarantoolBot document
Title: `box.cfg.bootstrap_leader` accepts instance names now

The option `box.cfg.bootstrap_leader`, which specifies the desired
bootstrap leader when bootstrap_strategy is "config" now accepts
instance names.

For example, this is a valid config without replication:
```lua
box.cfg{
    instance_name = 'main-server',
    bootstrap_strategy = 'config',
    bootstrap_leader = 'main-server'
}
```

When `box.cfg` contains some entries in `replication`, the node will
bootstrap from the node which has the instance name specified in
`box.cfg.bootstrap_leader`.

This is an addition to tarantool/doc#3432
sergepetrenko added a commit to sergepetrenko/tarantool that referenced this issue Jun 7, 2023
Make it possible to specify the bootstrap leader via an instance name in
addition to its URI and UUID.

While I'm at it, change the argument order of box_check_node_name() to
comply with box_check_uuid/uri/uri_set().

Closes tarantool#8539

@TarantoolBot document
Title: `box.cfg.bootstrap_leader` accepts instance names now

The option `box.cfg.bootstrap_leader`, which specifies the desired
bootstrap leader when bootstrap_strategy is "config" now accepts
instance names.

For example, this is a valid config without replication:
```lua
box.cfg{
    instance_name = 'main-server',
    bootstrap_strategy = 'config',
    bootstrap_leader = 'main-server'
}
```

When `box.cfg` contains some entries in `replication`, the node will
bootstrap from the node which has the instance name specified in
`box.cfg.bootstrap_leader`.

This is an addition to tarantool/doc#3432
sergepetrenko added a commit to tarantool/tarantool that referenced this issue Jun 8, 2023
Make it possible to specify the bootstrap leader via an instance name in
addition to its URI and UUID.

While I'm at it, change the argument order of box_check_node_name() to
comply with box_check_uuid/uri/uri_set().

Closes #8539

@TarantoolBot document
Title: `box.cfg.bootstrap_leader` accepts instance names now

The option `box.cfg.bootstrap_leader`, which specifies the desired
bootstrap leader when bootstrap_strategy is "config" now accepts
instance names.

For example, this is a valid config without replication:
```lua
box.cfg{
    instance_name = 'main-server',
    bootstrap_strategy = 'config',
    bootstrap_leader = 'main-server'
}
```

When `box.cfg` contains some entries in `replication`, the node will
bootstrap from the node which has the instance name specified in
`box.cfg.bootstrap_leader`.

This is an addition to tarantool/doc#3432
@andreyaksenov andreyaksenov self-assigned this Nov 13, 2023
@andreyaksenov andreyaksenov linked a pull request Nov 13, 2023 that will close this issue
@andreyaksenov andreyaksenov linked a pull request Nov 17, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants