-
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
Don't refresh modules twice per sync or refresh ops #46713
Don't refresh modules twice per sync or refresh ops #46713
Conversation
@DmitryKuzmenko That seems like the right approach to me, but there's some related test failures here: https://jenkins.saltstack.com/job/PR/job/salt-pr-linode-ubuntu14-n/21119/ @saltstack/team-core Is there some expected behavior here that I am missing that these tests are looking for duplicate grain values like that? |
I think this is fine but I'm a little curious about the failing test here. |
That tests are surprising me too.. I'll work on it. |
@DmitryKuzmenko Any update here? |
@cachedout I'll probably have time for this on the next week. |
re-run py |
da23ac4
to
3a20ca9
Compare
As for me it looks like removal of one unneeded refresh made the test work faster that produced the failures not because of my changes but because this made the test more reliable. I bet the updated grains module test will fail without my fixes on Jenkins. |
Ok, here is the problem: Tomorrow I plan to think more on the fix an provide a proposal. |
@DmitryKuzmenko Any luck on this one yet? |
@rallytime working on it. I've wrote "tomorrow" but it was my last working day before vacation =))) Sorry for confusion |
@DmitryKuzmenko When you're ready to come back to this, we'll need a merge conflict resolved, please. |
@cachedout sure. |
@DmitryKuzmenko Any updates here? |
@cachedout currently working on Tornado 5.0. Will done this later. |
re-run lint |
ping @DmitryKuzmenko any update here? We just branched 2017.7.9 which is the last bug fix release for 2017.7, so if this needs to get into the release it needs to be cleaned up and migrated to the 2017.7.9 release branch. thanks :) |
@Ch3LL This PR looks like a proper solution but it's not completed without fixing the race conditions I've described above. I have no solution for that race condition right now and have no time I can spend on it for now. So I don't believe we have a chance to include it to 2017.7 unless we have some free hands. |
no worries. When you do have time to get back to this lets move it to the 2018.3 branch, since there will be no more 2017.7 bug releases after 7.9. |
9bf2d79
to
7c18e3b
Compare
I've rebased to master. Also cherry-picked commits from #55233. |
@DmitryKuzmenko Linter |
What does this PR do?
Some of
saltutil
functions makes grains calculated twice per call. This happens because these functions fire bothrefresh_modules
andrefresh_pillar
events whilerefresh_pillar
event refreshes modules already by itself.refresh_modules
reloadsgrains
so firing both events we are getting double-grains calculation.This PR avoids calling of
refresh_modules
in caserefresh_pillar
is called.What issues does this PR fix or reference?
Fix #43941
Tests written?
No
Commits signed with GPG?
Yes