Repository navigation
Destroy MinionManager event resources deterministically - #70179
Merged
Merged
Conversation
twangboy
added a commit
to twangboy/salt
that referenced
this pull request
Aug 28, 2026
pre-commit's pinned black (24.2.0) wraps these with/patch.object chains differently than a newer local black run had produced. Fixes the "Pre-Commit / Run Pre-Commit Against Salt" CI failure on PR saltstack#70179.
twangboy
added a commit
to twangboy/salt
that referenced
this pull request
Sep 11, 2026
pre-commit's pinned black (24.2.0) wraps these with/patch.object chains differently than a newer local black run had produced. Fixes the "Pre-Commit / Run Pre-Commit Against Salt" CI failure on PR saltstack#70179.
twangboy
force-pushed
the
fix/70175/3008.x
branch
from
September 11, 2026 15:51
de8f4cf to
56cd5f0
Compare
twangboy
force-pushed
the
fix/70175/3008.x
branch
from
October 1, 2026 22:42
56cd5f0 to
e2074d6
Compare
Minion.start() never called destroy() when _real_start() raised SaltClientError because self.minion.restart was True, leaving event_publisher/event to be reclaimed only by __del__'s GC-time safety net. Destroy the MinionManager both before the daemonized multi-master failover retry and before the final return. The companion gap in MinionManager.destroy() was fixed in saltstack#70258. Refs saltstack#70175
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?
Destroys the
MinionManagerwhen the minion loses its master connection with no working failover.cli/daemons.py'sMinion.start()never calleddestroy()when_real_start()raisedSaltClientErrorbecauseself.minion.restartwasTrue-- it just returned (or looped for multi-master failover), leavingevent_publisher/eventto be reclaimed only by__del__'s GC-time safety net.salt/cli/daemons.py:Minion.start()now destroys theMinionManageronSaltClientError, both before retrying (daemonized multi-master failover) and before falling through to the finalbreak/return.The companion gap in
MinionManager.destroy()(it never closedevent_publisher/event) was fixed in #70258, and related leaks in #70206, #70257, #70259 and #70261, so that work is not repeated here.What issues does this PR fix or reference?
Refs #70175
Merge requirements satisfied?
Commits signed with GPG?
Yes