Repository navigation
Fix stale cluster_ready restart test - #70779
Merged
Merged
Conversation
…emantics PR saltstack#70755 added commit_index + last_applied persistence to the Raft log (commits 3e87ddd, backport 7af42dd); the test's docstring and Phase 2 assertions still described the pre-fix behaviour where commit_index came back as -1 after restart. Update preconditions to match persisted state, and rewire the on_ready callback since RaftService.__init__ now fires reconcile_membership during construction (which left fired2 empty when the callback was wired post-construction).
3 tasks done
2 of 3 tasks
This branch was previously deployed
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.
What does this PR do?
Fixes the nightly-red functional test
tests/pytests/functional/cluster/consensus/test_cluster_ready_scenarios.py::TestClusterReadyOnRestart::test_cluster_ready_fires_on_restart_from_persisted_logon
3008.xby aligning its Phase 2 preconditions with the Raft logpersistence semantics that landed shortly after the test was written.
Summary
behaviour (
commit_index == -1, empty SM, emptyfired2after restart).3e87ddd8bd8, backport7af42dd28e0) addedcommit_index+last_appliedpersistence to the Raft log and madeRaftService.__init__callreconcile_membershipduring construction.That shifted the observable restart state and moved
_on_membership_changefiring to inside
__init__, so the test's post-construction wiring of_on_readyleftfired2empty.and rewires the
on_readycallback throughRaftService.__init__via alocally-scoped subclass in
_make_cluster_with_ready_trackingso thecallback is in place before
reconcile_membershipfires.Context
Upstream
saltstack/salt-nightliesrun 42943653500 is on attempt 5, stillred on this exact slice (
functional zeromq 1) across 15 OSes and 2 FIPSvariants. Red since #70754 merged 2026-11-10 11:01 UTC.
Local verification on 3008.x (
venv314/bin/pytest):TestClusterReadyOnRestart::test_cluster_ready_fires_on_restart_from_persisted_log: PASSTestClusterReadyOnRestartclass (3 tests): 3/3 PASStest_cluster_ready_scenarios.pyfile (16 tests): 16/16 PASSpre-commit run --files tests/.../test_cluster_ready_scenarios.py: cleanTest plan
origin/3008.xafter this changeTestClusterReadyOnRestartclass (3 tests) passes locallytest_cluster_ready_scenarios.pyfile (16 tests) passes locallypre-commitclean on the touched test filefunctional zeromq 1slice goes green after mergeChangelog
A placeholder entry is staged as
changelog/RENAME_TO_PR_NUMBER.fixed.md-- this must be renamed tochangelog/<PR-number>.fixed.mdonce this PR is assigned a number (Salt'sCheck Changelog Entriespre-commit hook requires a numeric filename).References
(3008.x backport commits
3e87ddd8bd8,7af42dd28e0)saltstack/salt-nightlies42943653500