Timeout
Description of Issue/Question
Extra timeout of 10 Seconds
Setup
(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)
# Verify and set permissions on configuration directories at startup:
#verify_env: True
# Set the number of hours to keep old job information in the job cache:
#keep_jobs: 24
# Set the default timeout for the salt command and api. The default is 5
# seconds.
timeout: 5
# The loop_interval option controls the seconds for the master's maintenance
# process check cycle. This process updates file server backends, cleans the
# job cache and executes the scheduler.
#loop_interval: 60
# Set the default outputter used by the salt command. The default is "nested".
#output: nested
# Return minions that timeout when running commands like test.ping
#show_timeout: True
Steps to Reproduce Issue
(Include debug logs if possible and relevant.)
root@production-68c896db49-22x5b:/# time salt '*' test.ping
6d24cd3f-2e98-459f-8d32-ad72d5c7bde5:
True
01688c85-cbd7-4ceb-943f-557db25ca347:
True
5fc65056-26d4-46df-9dbf-23276009ba94:
Minion did not return. [No response]
88794d2b-252c-480c-9305-3b68a359ab14:
Minion did not return. [No response]
94878b6b-aae4-4eb6-a5aa-bfa358009607:
Minion did not return. [No response]
b7627a08-a79d-4a62-bc8b-8f1ccc6168b4:
Minion did not return. [No response]
fccd8230-d445-4325-b027-545ca427fe61:
Minion did not return. [No response]
e2ba7b45-c606-4e75-a61b-4151069f5e4f:
Minion did not return. [No response]
d7eb917e-6be0-4a5d-b7ba-fdf227b902fd:
Minion did not return. [No response]
ccb97450-2371-4b5c-b1f7-a5c97dc70afc:
Minion did not return. [No response]
59864120-6849-464d-b4d0-a5023718c718:
Minion did not return. [No response]
real 0m16.081s
user 0m0.698s
sys 0m0.189s
###########
root@production-68c896db49-22x5b:/# time salt '*' test.ping -t 20
6d24cd3f-2e98-459f-8d32-ad72d5c7bde5:
True
01688c85-cbd7-4ceb-943f-557db25ca347:
True
5fc65056-26d4-46df-9dbf-23276009ba94:
Minion did not return. [No response]
88794d2b-252c-480c-9305-3b68a359ab14:
Minion did not return. [No response]
94878b6b-aae4-4eb6-a5aa-bfa358009607:
Minion did not return. [No response]
b7627a08-a79d-4a62-bc8b-8f1ccc6168b4:
Minion did not return. [No response]
fccd8230-d445-4325-b027-545ca427fe61:
Minion did not return. [No response]
e2ba7b45-c606-4e75-a61b-4151069f5e4f:
Minion did not return. [No response]
d7eb917e-6be0-4a5d-b7ba-fdf227b902fd:
Minion did not return. [No response]
ccb97450-2371-4b5c-b1f7-a5c97dc70afc:
Minion did not return. [No response]
59864120-6849-464d-b4d0-a5023718c718:
Minion did not return. [No response]
real 0m30.925s
user 0m0.917s
sys 0m0.157s
Versions Report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
Salt: 2017.7.4
Dependency Versions:
cffi: Not Installed
cherrypy: unknown
dateutil: 2.4.2
docker-py: Not Installed
gitdb: 0.6.4
gitpython: 1.0.1
ioflo: Not Installed
Jinja2: 2.8
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: 1.0.3
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.12 (default, Dec 4 2017, 14:50:18)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.2.0
RAET: Not Installed
smmap: 0.9.0
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: Ubuntu 16.04 xenial
locale: ANSI_X3.4-1968
machine: x86_64
release: 4.4.111+
system: Linux
version: Ubuntu 16.04 xenial
Also i dont have "gather_job_timeout: 10" in my master configuration , not sure if its enforced by default
The minions that respond with Minion did not return. [No response] are you expecting them to return?Is the minion actually running?
The timeout option is the time it takes until the master queries the minions to see if they are still running the job. It sends cmd saltutil.find_job to each minion which then uses the gather_job_timeout argument you mentioned which 5 is the default. So i would expect atleast 10 seconds if the minions aren't returning and possibly more if the minions are reporting back that they are still running the job.
HI Megan,
5 Second (time is acceptable) , coz that configure in master conf , but for each we get 5 + 10 (is that gather time out) we dont have this is our master conf . Is it applied by default !!
Minion are not running , my concern was when aoi time is set to 5 , it should end in 5 second . In our case no matter whats the timeout it adds 10 second
root@production-685fbbc7f7-4smqt:/srv/salt# time salt '*' test.ping -t 30 d6309560-5f50-432e-b208-d3a12b3ef71f: True 6d24cd3f-2e98-459f-8d32-ad72d5c7bde5: True 01688c85-cbd7-4ceb-943f-557db25ca347: True 2e29af33-e90c-4799-b13f-18daf95c31f7: Minion did not return. [No response] 5fc65056-26d4-46df-9dbf-23276009ba94: Minion did not return. [No response] 88794d2b-252c-480c-9305-3b68a359ab14: Minion did not return. [No response] 94878b6b-aae4-4eb6-a5aa-bfa358009607: Minion did not return. [No response] 3d1a155d-fd58-4a8e-b511-9c4afe13a8fe: Minion did not return. [No response] 828a2bff-69b2-41d8-967b-3a0dfe61613a: Minion did not return. [No response] b7627a08-a79d-4a62-bc8b-8f1ccc6168b4: Minion did not return. [No response] 6853a003-8b7d-454c-95bd-a67fa5e197da: Minion did not return. [No response] fccd8230-d445-4325-b027-545ca427fe61: Minion did not return. [No response] e2ba7b45-c606-4e75-a61b-4151069f5e4f: Minion did not return. [No response] aaa93308-b6b2-4ad7-bbbb-da62901e9512: Minion did not return. [No response] d7eb917e-6be0-4a5d-b7ba-fdf227b902fd: Minion did not return. [No response] 26757833-86a4-4b10-a29c-f2f3e65baafa: Minion did not return. [No response] ccb97450-2371-4b5c-b1f7-a5c97dc70afc: Minion did not return. [No response] 59864120-6849-464d-b4d0-a5023718c718: Minion did not return. [No response]
real 0m41.012s user 0m0.955s sys 0m0.163s
Manual timeout of 30 seconds ends in 40 seconds !!
ping @saltstack/team-core would this be considered expected behavior?
My understanding is that 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?
I spoke offline to the core team and yes this is expected behavior if a minion is offline or non existent. Will close as expected behavior. thanks :)
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.
can we tune those two timeouts as well? our goal is to minimize the waiting time in case the minion is offline or non existent.
Any update on this? Or do you need a new issue (as question) to discuss the follow up question?
@emasean It would be best to create a new issue for that so that if/when code is written, we can more logically track it.