-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Salt masters re-render pillar data in various state modules (including state.sls) #55106
Comments
It appears evident from the source, that when calling https://github.com/saltstack/salt/blob/master/salt/modules/state.py#L1301 |
Verified in my cluster tests. ran in salt version |
I think what you are looking for is I think it is intuitive to use I can only see this as "Working as intended" |
I tend to agree that this is intended behavior. You can enable pillar caching to reduce the load: https://docs.saltstack.com/en/latest/ref/configuration/master.html#pillar-cache-options However, there is a recently fixed related regression: #54941 |
Thanks for the clarification on Now for the flag suggestion, did you mean as a CLI flag or as a |
Note: |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Thank you for updating this issue. It is no longer marked as stale. |
Okay, the above comment is totally wrong. The PR I linked to is not changing the behavior. Also, I've verified that we do intend to request fresh pillar data any time we run a state (including |
Thanks for tracking this down @dwoz I originally wrote the state system to always reload the pillar when calling state runs. this is critical to ensure execution consistency. I suggest this issue is closed and that we open another issue to ensure that documentation is accurate everywhere and that we add an option to state runs to not refresh the pillar. They all possible bases here should be fully covered. |
done @thatch45 |
@sagetherage have you added the option for state runs to not refresh the pillar (or opened the issue for it)? |
Description of Issue
Pulling large amounts of pillar data from the salt master can be an expensive operation. For this reason, pillar refreshes should only occur when explicitly requested or heavily implied (e.g. minion startup,
saltutil.sync_all
,saltutil.refresh_pillar
,state.highstate
,state.apply
with no state specified). However, through observation and troubleshooting it is evident fresh pillar data is being pulled from the master to the minions when executing at least the following commandspillar.items
,state.sls <state>
state.apply <state>
.Setup
Normal salt installation. Put some dummy pillar data and apply via top, do not perform a pillar refresh nor restart of salt-minion.service.
My test case pillar looked like this:
Steps to Reproduce Issue
Run some commands to reveal issue:
^ This is expected behavior without a pillar refresh, but:
is not.
Furthermore, the pillar will be pulled during
state.sls
andstate.apply
. Let's create a state to test this:And call it:
and
Versions Report
The text was updated successfully, but these errors were encountered: