hashicorp / raft-autopilot

Raft Autopilot
Mozilla Public License 2.0
21 stars 5 forks source link

Update leader detection and make AddServer safer #2

Closed mkeeler closed 3 years ago

mkeeler commented 3 years ago

Also prevent not being able to detect the leader from potentially causing a crash.

In some cases of restarting nodes with different addresses the leader address which raft knows about may not actually be an address in the raft configuration. Consul for example would previously prevent updating the address of a node for single or 2 node clusters as the code to do so would previously have cased the removal of the server from the configuration first so that it could be updated.

With the AddServer modifications to be able to update the address of a server without requireing removals as well as prevent unsafe removals that would cause leadership loss, the applications can now just request the server be added.