Skip to content

docs: document master-cluster reference topologies - #69540

Merged
dwoz merged 3 commits into
saltstack:3008.xfrom
dwoz:dwoz/docs/multimaster-ha-3008
Oct 20, 2026
Merged

dwoz merged 3 commits into
saltstack:3008.xfrom
dwoz:dwoz/docs/multimaster-ha-3008

Conversation

@dwoz

@dwoz dwoz commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

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 -- a
copy-pasteable companion to the existing master-cluster tutorial
that covers two concrete production topologies:

  • 2-node HA pair -- minimum cluster that survives one master
    outage; documents the safe-failure split-brain behaviour.
  • 3-node production cluster -- the recommended starting point;
    Raft majority survives a single peer outage.

Both topologies use the 3008.0 cluster_isolated_filesystem mode so
they 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

  1. Default the reference topologies to
    cluster_isolated_filesystem: True.
    Newer (3008.0) but removes
    the shared-storage dependency from the reference implementation.
    Shared-FS is still documented in the existing
    tutorial-master-cluster page.
  2. Round-robin LB on both 4505 and 4506 with no session
    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.
  3. Two-node cluster: prefer split-brain refuse-writes over manual
    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_voter
    workaround on purpose.
  4. No syndic / no multimaster failover combined with cluster.
    Cluster + syndic is possible but out of scope; cluster +
    master_type: failover minion-side is not supported and we
    should 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 survived
    the load, the host doesn't list itself in cluster_peers, and
    both 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:

$ pytest tests/pytests/functional/test_cluster_topology_documented.py \
         tests/pytests/unit/test_haproxy_documented_config.py
========================= 19 passed in 2.15s =========================

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.
  • No skipif / xfail dodges 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 8

This 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.

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.
dwoz added 2 commits June 30, 2026 18:02
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.
@dwoz

dwoz commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

Code fix for the cluster_pool_port / 4520 contract asserted here landed in #70079 (3008.x). Merge-forward will carry to master.

@dwoz
dwoz marked this pull request as ready for review August 24, 2026 21:00
@dwoz
dwoz requested a review from a team as a code owner August 24, 2026 21:00
@twangboy twangboy modified the milestones: Argon v3008.3, Argon v3008.5 Oct 1, 2026
@dwoz
dwoz merged commit d4fb608 into saltstack:3008.x Oct 20, 2026
620 of 923 checks passed
@twangboy twangboy modified the milestones: Argon v3008.5, Argon v3008.7 Oct 30, 2026
@dwoz
dwoz deleted the dwoz/docs/multimaster-ha-3008 branch November 13, 2026 08:30

This branch was previously deployed

1 inactive deployment
ci — 58e247d1 Deployed Jul 6, 2026 by dwoz via Build Onedir Packages / RPM (arm64) #24939
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants