Master calling find_job every 10 seconds, Windows takes 10 seconds to execute it
@xeacott is already working on this.
Since May 7, 2021.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description of Issue/Question
When you run salt win something, about every 10 seconds salt master calls find_job to see how the job running on the minion is going. On windows this starts a new thread. On windows starting a new thread seems to take about 10 seconds.
This just cause a lot of thrashing on the windows minion. A work around for this of salt -t 60 .... which just gives find_job longer to respond.
Steps to Reproduce Issue
Add some addition logging around when the minion first gets the request (before a thread is started), find_job starts. On Unix/Linux this in ms on windows this is about 10-15 seconds.
Suggest Fix
Add find_job to minion.py and no longer fork or start a thread, and therefore responds in under a second, removing the need to use the salt -t <secs> option.
Maybe a change here https://github.com/saltstack/salt/blob/81eb15264380d82267ffc3c1930410baf1f3fbf1/salt/minion.py#L1510 to check for find_job and stop the fork/thread?
Examples
https://github.com/saltstack/salt/issues/48882#issuecomment-441038972 Slow response from Windows minions on 2018.3
#30007 return delay of a find_job task
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.