Repository navigation
Only use the provider conf.d file we are testing - #5
Merged
Merged
Conversation
dwoz
added a commit
that referenced
this pull request
Dec 2, 2019
…ged-5 [PyTest #5] Only root can add users
Akm0d
pushed a commit
that referenced
this pull request
May 8, 2026
Closes three gaps identified in the Raft correctness audit. Dynamic join — joiner starts as learner (priority #2 & #6) ----------------------------------------------------------- A master that joins via discover_peers starts _publish_daemon before the join handshake completes, so cluster_peers is empty and RaftService is not started. Once join-reply arrives the MasterPubServerChannel now calls _start_raft_as_learner(), which: - builds pushers to every peer received in join-reply (fixes gap #6: dispatcher had no pushers to reply to the leader) - starts RaftService with voting=False (fixes gap #2: joiner was starting as a voter, risking split-brain before the leader promoted it) salt/channel/server.py - _start_raft_as_learner(known_peers): new helper started from the join-reply handler; builds peer pushers and calls RaftService(voting=False). - join-reply handler: calls _start_raft_as_learner after event.set(). salt/cluster/consensus/service.py - RaftService(voting=True): new optional parameter passed to Node so the node starts in learner mode when the master joined dynamically. Founding CONFIG entry (priority #5) ------------------------------------- The first elected leader of a fresh cluster now writes a CONFIG entry recording the founding voter set before any application entries. This makes cluster membership durably verifiable from the log alone. salt/cluster/consensus/service.py - _maybe_commit_founding_config(): proposes {voters, learners} CONFIG entry when the leader's log is empty; no-ops if the log already has content. - _heartbeat_tick: calls _maybe_commit_founding_config() on every tick while leader (the guard makes it idempotent). Tests ----- tests/pytests/functional/cluster/consensus/test_raft_service.py - TestFoundingConfig: leader writes CONFIG entry on empty log; no-ops if log is non-empty. - TestDynamicJoinerAsLearner: RaftService(voting=False) produces a non-voting node; learner-mode service does not start elections.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.