saltstack / saltstack/salt

Master calling find_job every 10 seconds, Windows takes 10 seconds to execute it

Open
#51,621 19 comments 7 reactions 2 assignees View on GitHub

@xeacott is already working on this.

Since May 7, 2021.

bug severity-medium
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.