Repository navigation
Fix for 54941 pillar_refresh regression - #54942
Conversation
UtahDave
left a comment
There was a problem hiding this comment.
There's one more scenario I think I'd love to see tested. I'm not sure exactly where you would add this, but it would be great if in one of these spots you add this workflow:
- Add a key/value pair to the pillar sls file
- Execute a
test.ping - Test that the pillar data has NOT been updated with the new key/value pair yet.
- Run a
saltutil.refresh_pillar - Then verify that the pillar data has been updated.
The reason for this is it would be great to make sure that a full pillar refresh isn't happening during a regular salt command.
Is this scenario already covered by one of these tests you already have?
I thought about adding this exact test because it most closely mirrors the way we found the regression. The only reason I didn't is that we're essentially using |
OK, valid point. You are correct. Those calls would trigger the bad behavior, if present. |
Allow to refresh pillar synchronously This PR adds the optional ability to run saltutil.refresh_pillar Allow to refresh pillar synchronously, saying saltutil.refresh_pillar async=False. I tried to follow the explanatory comment from @gtmanfred and I believe that this works, still I am not sure about the mentioned use of the _gather_pillar() method. I am happy to rework the PR if something is missing. [DKuzmenko] I've slightly reworked it to resolve conflicts with functionality added to master by DWoz in saltstack#54942. Co-authored-by: Dmitry Kuzmenko <[email protected]>
What does this PR do?
Only refresh pillar data when
BaseMinion.gen_modulesis called for the first time. Subsequent pillar refreshes are done when thepillar_refreshevent if fired.What issues does this PR fix or reference?
#54941
Tests written?
Yes
Commits signed with GPG?
Yes