Repository navigation
Conversation
This was referenced Jul 23, 2024
Closed
Contributor
|
We are not longer accepting bugfixes on the 3006.x branch. Please rebase this against the 3008.x branch. |
clean overrides the clean_dynamic_modules option for a single call: False only adds and updates modules, True also removes any that are not in the file roots, and None (the default) keeps using the option. This lets a caller that syncs implicitly avoid deleting modules it does not own, whatever clean_dynamic_modules is set to. Refs saltstack#65027
A masterless minion compiles pillar before anything has run saltutil.sync_grains, so pillar that referenced a custom grain from salt://_grains failed to render on the first run. SMinion now syncs _grains from every environment in file_roots before it loads grains, when file_client is local. The sync only adds and updates grains and never removes any, whatever clean_dynamic_modules says, so grains shipped by salt-ssh into extension_modules survive. The sync runs against a throwaway cachedir. The fileserver caches file lists per environment and backend rather than per set of roots, so a list cached for the target's default file_roots was served to later readers of the same cachedir. On a salt-ssh target that made file.recurse find nothing from salt://, and state.single over salt-ssh packed no files when the master and the target shared a filesystem. Based on the approach in the original change for this issue. Adds a salt-ssh regression test for file.recurse from salt://. Fixes saltstack#65027 Co-authored-by: Daniel A. Wozniak <daniel.wozniak@broadcom.com>
twangboy
approved these changes
Nov 4, 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.
What does this PR do?
Ensures that grains are sync'd before loading grains and then compiling pillar, since there could be custom grains used in pillar files, which will throw rendering errors if not found, when in masterless mode on a salt-minion
Rework of accidentally closed PR 65792
What issues does this PR fix or reference?
Fixes: #65027
Previous Behavior
Would throw rendering errors if custom grains in salt://_grains were used in pillar files, salt-minion in masterless mode.
New Behavior
No rendering errors thrown if custom grains in salt://_grains were used in pillar files, and custom grains values available in pillar, and salt-minion in masterless mode.
Additional tests to be written ensuring use with a salt-master is unaffected.
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes
Please review Salt's Contributing Guide for best practices, including the
PR Guidelines.
See GitHub's page on GPG signing for more information about signing commits with GPG.