Fran Bull bd3128752c cmd/natc,tsconsensus: add 'follower only' bootstrap option
Currently consensus has a bootstrap routine where a tsnet node tries to
join each other node with the cluster tag, and if it is not able to join
any other node it starts its own cluster.

That algorithm is racy, and can result in split brain (more than one
leader/cluster) if all the nodes for a cluster are started at the same
time.

Add a FollowAddr argument to the bootstrap function. If provided this
tsnet node will never lead, it will try (and retry with exponential back
off) to follow the node at the provided address.

Add a --follow flag to cmd/natc that uses this new tsconsensus
functionality.

Also slightly reorganize some arguments into opts structs.

Updates #14667

Signed-off-by: Fran Bull <fran@tailscale.com>
2025-07-16 09:11:20 -07:00
..
2025-01-07 13:05:37 -08:00
2023-08-03 13:00:45 -07:00
2024-04-16 15:32:38 -07:00
2025-03-29 11:02:42 -07:00