mirror of
https://github.com/openziti/ziti.git
synced 2026-09-10 08:45:41 +00:00
975a23e5f6
- adds 'ziti ops cluster recover <controller-config>', an offline CLI that opens a stopped controller's data directory, forces the raft configuration to a single local node via raft.RecoverCluster, and aligns the FSM-tracked member list in ctrl-ha.db so stale peers don't leak through IsPeerMember or CtrlAddresses on restart - removes the previous in-process recovery path: the cluster.recover config flag and the corresponding RaftConfig.Recover field are gone, along with the os.Exit branch in Controller.Init that consumed them - adds BoltDbFsm.OverwriteServers and GetCachedServers so offline tooling can update and inspect the FSM-side server list without a live raft instance; OverwriteServers runs before raft.RecoverCluster so the snapshot it produces captures the corrected configuration - updates Broker.AcceptClusterEvent to call DeleteRemovedPeers on every ClusterLeadershipGained, making the controllers entity table self-healing for any membership change a non-leader missed (offline recovery, or a 'cluster remove' applied while another node was leader) - wires the new subcommand into both V1 and V2 CLI roots so it's reachable regardless of ZITI_CLI_LAYOUT - switches filesystem path joins in the raft package and the recover command from path.Join to filepath.Join - tests bootstrap a two-node configuration, run recoverDataDir, then verify the post-recovery snapshot, the FSM-cached server list, and Fsm.GetCurrentState (after starting a real raft instance) all report the survivor only
2 lines
4 B
Plaintext
2 lines
4 B
Plaintext
2.1
|