Repository navigation
Description
Observed behavior
On every bringup of a salt-master cluster, each minion emits three hard [ERROR] lines during the race window where the minion authenticates before the clustered master's Raft has caught up:
[ERROR ] Master did not return a session key for pillar request (cluster not ready)
[ERROR ] Error while bringing up minion for multi-master. Is master at 10.77.0.11 responding? The error message was Exception getting pillar.
Traceback (most recent call last):
...
salt.exceptions.SaltClientError: Exception getting pillar.
[ERROR ] This Minion was scheduled to stop. Not running Minion.tune_in()
The minion retries and eventually connects, and the cluster reaches steady state. But operators reviewing minion logs see three ERROR stacks every bringup and reasonably assume something went wrong.
Root cause chain
salt/channel/client.py:269—AsyncReqChannel.crypted_transfer_decode_dictentryraisesAuthenticationError("Master did not return a session key for pillar request (cluster not ready)")when the master defers with thecluster_retrysentinel. This is intentional (PR Retry a clustered master's deferral instead of decrypting it #70564) — the sentinel means "my Raft isn't ready, retry shortly."salt/pillar/__init__.py:271-273— catches thisAuthenticationError, logsexc.messageatlog.error, re-raises asSaltClientError("Exception getting pillar.").salt/minion.py:1985-1991—_connect_minioncatchesSaltClientErrorand logslog.error("Error while bringing up minion for multi-master. Is master at %s responding?...", exc_info=True), callsminion.destroy(), sleeps, and loops.minion.destroy()setsself._running = False. On the next (successful) iteration,minion.tune_in(start=False)calls_pre_tune()which sees_running is Falseand logslog.error("This Minion was scheduled to stop. Not running Minion.tune_in()")— then returns without binding.
Step 4 is actually a latent correctness bug: the retry-after-destroy path never rebinds. In practice the minion survives because a sibling _connect_minion task (for another master) succeeds without having gone through the retry/destroy path. But the log line is misleading AND the retry-and-recover case silently loses that master connection.
Proposed fix
salt/pillar/__init__.py: when theAuthenticationErrorcarries the cluster-not-ready sentinel, log atDEBUGinstead ofERROR. The condition is a routine, self-healing transient during bringup.salt/minion.py::_connect_minion: detect the cluster-not-readySaltClientErrorand log atINFOwith a short message ("master still catching up, retrying") instead of a fulllog.error(..., exc_info=True)traceback. Non-cluster errors keep the existing ERROR path.salt/minion.py::_connect_minion: resetself._running = Noneafterdestroy()so the next successful iteration doesn't trip the "scheduled to stop" branch and actually binds the minion.
Reproduction
tests/monitoring/cluster-5node/ in the salt repo — bring up stack cold, docker logs c5-salt-minion-1 shows all three ERROR lines on every startup.
Impact
- Operators report spurious failures from routine startups.
- Silent correctness gap: the retry-and-recover path on the first master never binds that minion instance (hidden by sibling masters succeeding).
- No functional outage observed because sibling master tasks keep the minion alive; failover still works.
Fix target: 3008.x.
Activity
Cluster-master stability bundle for 3008.x (8 fixes + regression test…
dwoz commentedon Nov 10, 2026
Resolved by #70756 (merge commit a40f817 on 3008.x).