Last active
November 29, 2016 11:38
-
-
Save bemeyert/0b85b300214b14321550be0caa31c544 to your computer and use it in GitHub Desktop.
Runner timeout via Salt API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Json_return="$(curl -sSk ${API} ${CURL_OPTS} \ | |
-H 'Content-Type: application/json' \ | |
-H 'Accept: application/json' \ | |
-b ${cookie_file} \ | |
-d ' | |
[{ | |
"client": "runner", | |
"fun": "state.orchestrate", | |
"mods": "'"${orchestrator_state}"'", | |
"timeout": 900, | |
"pillar": '"${pillars}"' | |
}] | |
')" | |
# Logs from Nginx proxy in front of Salt API | |
10.77.12.18 - - saltapi [2016-11-28T15:43:48+01:00] "POST /login HTTP/1.1" 200 170 0.023 "-" "curl/7.29.0" xff:"-" pid:9211 | |
10.77.12.18 - - saltapi [2016-11-28T15:48:49+01:00] "POST / HTTP/1.1" 500 1317 300.023 "-" "curl/7.29.0" xff:"-" pid:9211 | |
# Error shown in the Saltmasters logs: | |
016-11-29 11:22:41,162 [cherrypy.error.51667792 ][ERROR ][28523] [29/Nov/2016:11:22:41] Traceback (most recent call last): | |
File "/usr/lib/python2.6/site-packages/cherrypy/_cpwsgi.py", line 169, in trap | |
return func(*args, **kwargs) | |
File "/usr/lib/python2.6/site-packages/cherrypy/_cpwsgi.py", line 96, in __call__ | |
return self.nextapp(environ, start_response) | |
File "/usr/lib/python2.6/site-packages/cherrypy/_cpwsgi.py", line 379, in tail | |
return self.response_class(environ, start_response, self.cpapp) | |
File "/usr/lib/python2.6/site-packages/cherrypy/_cpwsgi.py", line 222, in __init__ | |
self.run() | |
File "/usr/lib/python2.6/site-packages/cherrypy/_cpwsgi.py", line 320, in run | |
request.run(meth, path, qs, rproto, headers, rfile) | |
File "/usr/lib/python2.6/site-packages/cherrypy/_cprequest.py", line 603, in run | |
raise cherrypy.TimeoutError() | |
TimeoutError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the JSON POST | |
Json_return="$(curl -sSk ${API} ${CURL_OPTS} \ | |
-H 'Content-Type: application/json' \ | |
-H 'Accept: application/json' \ | |
-b ${cookie_file} \ | |
-d ' | |
[{ | |
"client": "runner", | |
"fun": "state.orchestrate", | |
"mods": "'"${orchestrator_state}"'", | |
"pillar": '"${pillars}"' | |
}] | |
')" | |
# Return from the API | |
'{"status": 500, "return": "Traceback (most recent call last):\n | |
File \"/usr/lib/python2.6/site-packages/salt/netapi/rest_cherrypy/app.py\", line 684, in hypermedia_handler\n | |
ret = cherrypy.serving.request._hypermedia_inner_handler(*args, **kwargs)\n | |
File \"/usr/lib/python2.6/site-packages/cherrypy/_cpdispatch.py\", line 34, in __call__\n | |
return self.callable(*self.args, **self.kwargs)\n | |
File \"/usr/lib/python2.6/site-packages/salt/netapi/rest_cherrypy/app.py\", line 1068, in POST\n | |
token=cherrypy.session.get('\''token'\'')))\n | |
File \"/usr/lib/python2.6/site-packages/salt/netapi/rest_cherrypy/app.py\", line 957, in exec_lowstate\n | |
ret = self.api.run(chunk)\n File \"/usr/lib/python2.6/site-packages/salt/netapi/__init__.py\", line 70, in run\n | |
return l_fun(*f_call.get('\''args'\'', ()), **f_call.get('\''kwargs'\'', {}))\n | |
File \"/usr/lib/python2.6/site-packages/salt/netapi/__init__.py\", line 158, in runner\n | |
return runner.cmd_sync(kwargs, timeout=timeout)\n | |
File \"/usr/lib/python2.6/site-packages/salt/runner.py\", line 120, in cmd_sync\n | |
return mixins.SyncClientMixin.cmd_sync(self, reformatted_low, timeout)\n | |
File \"/usr/lib/python2.6/site-packages/salt/client/mixins.py\", line 167, in cmd_sync\n | |
jid=job['\''jid'\''])\nSaltClientTimeout: RunnerClient job '\''20161128154349063338'\'' timed out\n"}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment