How to turn the different timeout values
In https://github.com/saltstack/salt/issues/46518, it was stated:
the master will send the command to the minion then wait 5 seconds, if it still has not gotten a return it will try to run another command checking for the status of the job and wait another 5 seconds. And the other 5 seconds not accounted for in the first example @nitinjain999 posted is just the salt client initiating/sending/receiving. Is this correct or would we expect the salt cli to kill sooner?
Two questions:
- Are those two latter timeout values configurable?
- If 1 is positive, where can we find those configurations?
you can configure the check for running jobs using gather_job_timeout as documented here: https://docs.saltstack.com/en/latest/ref/configuration/master.html#gather-job-timeout
so what is the minimum timeout allowed/recommended for those values and at the same time not causing false negatives (too small timeout reporting the minions are down despite its up since the network RTT is simply larger than the timeout).
well https://www.suse.com/documentation/suse-manager-3/book_suma_best_practices_3/data/bp_chap_salt_minion_scaleability_timeouts.html explains it, so I assume if the network RTT is maximum 2 sec, we can set 1 sec to timeout and 1 sec to gather_job_timeout
Worth mention that this network RTT is just a generic term, not exactly 1 RTT between the salt-master and salt-minion since test.ping is not ICMP ping, its on TCP level I assume, so it involves several RTTs between the salt-master and the minions.
Can we set those timeouts on per-request-basis? test.ping should have lower timeout while state.apply should have higher timeout otherwise they will certainly timeout with 1:1 as values.
According to the following documentation: https://docs.saltstack.com/en/latest/ref/cli/salt.html the timeout can be tuned per-request-basis but not gather_job_timeout, is there anyway to steer gather_job_timeout as well per-request-basis?
we could probably add an option to allow someone to set it that way. I'll approve as a feature request.
So the defaults configurations were:
timeout: 5 sec
gather_job_timeout: 10 sec
(total 15 sec)
We change the defaults to:
timeout: 14 sec
gather_job_timeout: 1 sec
(total 15 sec)
and when invoking test.ping, we specify the timeout to be 1, so total 2 sec.
We have another question regarding this topic, we are running orchestration on the master and wonder if we can set a different timeout overriding the default for individual state within the orchestration?
it looks like there is a timeout arg for some of the functions in here: https://docs.saltstack.com/en/latest/ref/states/all/salt.states.saltmod.html
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Thank you for updating this issue. It is no longer marked as stale.
We recently started managing windows salt-minions and noticed that windows salt-minion has much higher rate of Minion did not return. [No response].
After some searching we suspect it's because windows minions sometimes failed to return the find_job job within gather_job_timeout timeout.
Increasing this gather_job_timeout seems to help in this situation. But we are hesitant to increase this timeout in master config as this global change will make salt command to take longer time to return when some minion is actually offline.
We hope we can override this gather_job_timeout per command.
This feature would be extremely helpful. Adding gather_job_timeout to the command client as a flag (similar to -t X) would help for known long running commands.