attempts hasn't resulted in success, so I'm going to ask here and hope that
someone might know how to do what I'm looking for... :)
I have an application that's using the Salt API to call a custom module on
a minion(s), and currently have code something like the following:
opts = salt.config.minion_config('/etc/salt.tds/minion') # Custom config
caller = salt.client.Caller(mopts=opts)
result = caller.function('publish.full_data', host, cmd, args)
The 'cmd' is an 'install' method in the custom module which is actually
doing some checking and installing (upgrading or downgrading) a given
package. 'args' contains the application name and version (or sometimes
just 'restart' to restart the app - that part actually seems to work okay).
The issue I'm running into is that the actual installation process takes up
to 30 seconds to run, and 'publish.full_data' defaults to a 5 second timeout,
so my result is always an empty dictionary even if the install is successful
because the function() method exits well before the module on the minion
has time to respond. I tried passing a timeout as well, but unfortunately
after digging through the salt.minion.load_args_and_kwargs() method I
found that the 'keywords' value for publish.full_data in 'argspec' is... None.
So I can't actually fix the timeout.
So this leads me to the question: is there another, asynchronous way I can
try to accomplish this? Initially I considered salt.runner.RunnerClient but
then realized that it only can be used on the Salt master, and the appli-
cation using the Salt API exists on a set of client machines (the custom
minion configuration is to allow non-root users to call _only_ the custom
module), so that's out, and I'm not really seeing anything else... help? :)
Thanks in advance.
p.s. In case it matters, using Salt 2014.7.1 both on masters, minions and
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 firstname.lastname@example.org.
For more options, visit https://groups.google.com/d/optout.