The timeout behavior in the current version of Salt + salt-api is a bit wonky. This is fixed in the upcoming Salt release (currently in RC).
A workaround for the current release is to send JSON instead of urlencoded data and to specify a long timeout:
[{"client": "local", "fun": "state.highstate", "tgt": "testvm", "timeout": 600}]
Make sure you send the correct content-type header as well.
Another option is, as you suggested, to execute asynchronously and poll for the result. See the /minion and /jobs URLs documentation.
Finally, a third way (that requires the most set up) is to execute asynchronously and to watch the HTTP event stream for job returns.
There's a partial implementation in sh here:
https://gist.github.com/whiteinge/a646d4d937960d3ef306
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "Salt-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/salt-users/t3fL3g1rdMc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to salt-users+...@googlegroups.com.
salt-api is now included with Salt core in 2014.7.0rc1 so you should
uninstall the stand-alone package.
If you find you still need to tweak the timeout the argument is passed
through salt-api to the LocalClient class in Salt. Documentation is
here:
http://docs.saltstack.com/en/latest/ref/clients/index.html#salt.client.LocalClient.cmd
No activation requirled. POSTing to /minions is the same as POSTing to
/ except the job is async. The CLI analog is running ``salt --async``
vs just ``salt``.
Do you not see job results via the /job/<jid> URL at all? If you run
the ``saltutil.running`` function on the minion after starting the
initial job you can see what the minion is currently working on. The
/jobs/<jid> URLs are the same as ``salt-run jobs.lookup_jid <jid>``
and you should see the same job output in both places.
Thanks for the report. I can reproduce this. Looks like a regression.
I'll put in a fix as soon as I can this week. You can track the bug
here:
https://github.com/saltstack/salt/issues/15218