Repository navigation
docs: document master-cluster reference topologies - #69540
Merged
Merged
Conversation
New tutorial doc/topics/tutorials/master-cluster-reference.rst with verified master configs for both topologies using isolated-FS mode and a complete HAProxy reference (round-robin, mode tcp, 4505/4506 only, no cluster_pool_port exposed). Companion functional test loads every YAML block through salt.config.master_config and unit test structurally validates the HAProxy block. Fixes saltstack#64941 saltstack#64092.
Unit tests that assert each concrete claim in master-cluster-reference.rst against salt.config.DEFAULT_MASTER_OPTS defaults and against the cluster.members / cluster.ring_info / cluster.sync_roots runner signatures. If any of these drift from the doc without the doc being updated, the corresponding assertion turns red instead of the doc quietly going stale.
Adds integration tests that spin up the 2-node and 3-node isolated-FS
reference topologies (via existing cluster_master_{1,2,3}_isolated
fixtures) and assert Raft membership via salt-run cluster.members,
the documented cluster.ring_info dict shape, and per-master runtime
config (peers dont include self, cluster_isolated_filesystem=True).
Gated on RUN_CLUSTER_INTEGRATION=1 so shared CI runners are not asked
to pay the multi-minute bring-up cost by default.
Contributor
Author
|
Code fix for the |
twangboy
approved these changes
Aug 25, 2026
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.
NEEDS MAINTAINER REVIEW
This PR adds a worked reference for HA cluster topology. The
decisions baked into the reference implementations have downstream
support implications and need a maintainer to confirm them before
this PR is moved out of draft. See
Topology decisions
below.
Summary
Adds
doc/topics/tutorials/master-cluster-reference.rst-- acopy-pasteable companion to the existing master-cluster tutorial
that covers two concrete production topologies:
outage; documents the safe-failure split-brain behaviour.
Raft majority survives a single peer outage.
Both topologies use the 3008.0
cluster_isolated_filesystemmode sothey can be stood up on stock hosts with no shared storage. Includes
a complete HAProxy reference config and explains why round-robin LB
is correct here (and sticky sessions are wrong).
Closes #64941 -- Document cluster reference implementation(s)
Closes #64092 -- Multiple instances of a single master behind a load
balancer
Topology decisions that need maintainer sign-off
cluster_isolated_filesystem: True. Newer (3008.0) but removesthe shared-storage dependency from the reference implementation.
Shared-FS is still documented in the existing
tutorial-master-clusterpage.stickiness. Some operators have asked about source-IP hashing
to "pin" a minion to a master for log locality; doing that is
not recommended because it concentrates load on whichever peer
a minion first hashed to.
tiebreaker. A 2-node Raft cluster has no majority; the safe
failure mode is to refuse writes from both sides during a
partition. We do not document a manual
cluster.force_voterworkaround on purpose.
Cluster + syndic is possible but out of scope; cluster +
master_type: failoverminion-side is not supported and weshould not document it as such.
Tests
tests/pytests/functional/test_cluster_topology_documented.py-- loads every documented master config through
salt.config.master_config, asserts the cluster knobs survivedthe load, the host doesn't list itself in
cluster_peers, andboth 2-node and 3-node topologies are present.
tests/pytests/unit/test_haproxy_documented_config.py--structural parse of the documented HAProxy block: required
frontends/backends,
mode tcp,balance roundrobin,publish-side
timeout client/server>= 86400s,cluster_pool_port(4520) NOT exposed through the minion LB,identical server lists on both backends, health checks enabled
on every backend server line.
19/19 tests pass locally:
Verification
sphinx -b html -W --keep-going-- clean (exit 0).sphinx -b man -W --keep-going-- clean (exit 0).pre-commit run --files <changed>-- clean.pytest-- 19/19 pass.skipif/xfaildodges added.Out of scope (left for sibling PRs)
#63094(key signing in HA) -- PR 4#61768(grains on non-root master) -- PR 7#65229(pillar/state include ordering in cluster) -- PR 8This PR cross-links those topics via
:seealso:only.Stays draft
Per the agent prompt this PR stays draft until a human reviewer
confirms the four topology decisions above. The agent will NOT mark
it ready.