-
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
[BUG]Pillar not available randomly #57696
Comments
Thank you for the report. Could you provide more information, did you try to trace network connectivity? Any reason to call pillar every second? |
@krionbsd |
Did you run the state with -l debug? |
@krionbsd I've already tried that, with no luck, because it happens so randomly that I can't reproduce it by hand. And I think debugging the state.apply is useless because it fails due to lack of pillar data. |
After some testing I found most pillar that are missing have jinja conditions around them.
These kind of pillars get missing randomly |
I'm pretty sure I've narrowed down the problem. We have code like this:
And the problem is that the variable "roles" is randomly picking up values from other minions. So this is not only a serious bug, but also a significant security risk. |
Possibly this is related to #57765 |
I just found that every time you access a variable from the imported file, it renders the jinja. I don't see why this is necessary. It's a waste of resources and make it more prone to race conditions. |
@angeloudy I think you are not correct about the way that variable is accessed. We call that import 4 times. Anyhow, let's focus on the real bug and not cloud the issue with other things. We are getting data from other minions in this variable. That breaks everything. |
can you try this fix? #56513 and see if that helps. Thanks |
Unfortunately with recent workload I'm unlikely to be able to get much time to work on this any time soon. But it looks 90% likely that the threading issue in the task you point to is the cause of the issues here, so happy if you want to close this ticket. |
I have not been able to replicate this so i would like to see if @angeloudy has any luck? |
@angeloudy are you able to test this? |
ok closing the ticket, please mention me if this arises again or isn't fully fixed. |
Description
My pillar will become unavailable sometimes.
It happens randomly.
salt-call pillar.get mypillar
will return empty, then after a few seconds, it returns my data.I used the following script to catch the time when pillar is not available
After running for a few hours, the script returned
It's so inconsisten I am not sure how to debug.
Setup:
The text was updated successfully, but these errors were encountered: