-
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
Allow to refresh pillar synchronously #50168
Conversation
Update develop
Signed-off-by: Alexander Fischer <afischer@opentext.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thanks!
Signed-off-by: Alexander Fischer <afischer@opentext.com>
Signed-off-by: Alexander Fischer <afischer@opentext.com>
Signed-off-by: Alexander Fischer <afischer@opentext.com>
I get where you're going with this but I can't help but wonder if we should just generalize the pattern of "blocking" on a return event somewhere that we can re-use more easily. It seems like this is something that could be used in other places. Thoughts? |
…onstants into own module Signed-off-by: Alexander Fischer <afischer@opentext.com>
…onstants into own module Signed-off-by: Alexander Fischer <afischer@opentext.com>
Yeah, what we basically want is to be sure that minions work with the pillar, grain, state etc. information we expect them to work this, while dealing with an higher amount of saltenvs (using gitfs) which may change quickly. Still, this should be not part of this PR, as it sounds like a lot of planning and requires some deep knowledge of the code base, which I don't have :) |
Signed-off-by: Alexander Fischer <afischer@opentext.com>
I'm looking for a way to programmatically check if the pillar data is up to date and could be rendered. I wonder if this PR is what I'm looking for, but based on the change I can't tell if the exit code of synchronously updated pillars will be non-zero in case of an error. Could you please clarify this? |
To my understanding the |
Signed-off-by: Alexander Fischer <afischer@opentext.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@afischer-opentext-com OK, done. 👍
This may be not the smartest question, but what is the next step here, is there something I need to do? |
Signed-off-by: Alexander Fischer <afischer@opentext.com>
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 <dmitry.kuzmenko@dsr-corporation.com>
What does this PR do?
This PR adds the optional ability to run
saltutil.refresh_pillar
Allow to refresh pillar synchronously, sayingsaltutil.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.What issues does this PR fix or reference?
This PR relates to issue #50105
Previous Behavior
It was not possible to know when pillar got really refreshed and the minion is updated properly.
New Behavior
The user can ensure that pillar information is in a refreshed state.
Tests written?
Yes
Commits signed with GPG?
Yes