Orchestrater, runners and requisites

17 views
Skip to first unread message

Steve Hajducko

unread,
Jun 24, 2016, 9:37:28 AM6/24/16
to Salt-users
Is it possible to use requisites when executing salt.runner functions in the orchestrator?

I can't seem to get a runner function to depend on another runner function via requisites ( like onfail ), even if I have the runner return something similar to what the state modules return.  I've tried messing with return codes, sys.exiting from the runner, etc - nothing seems to work.

Do the requisites *only* work in the orchestrator for state module functions?


Colton Myers

unread,
Jun 24, 2016, 11:32:59 AM6/24/16
to salt-...@googlegroups.com
I think this is correct. The problem is that we haven't defined what a "failure" looks like in a runner, since they don't have a standardized return structure. The same problem applies to execution modules as well. Perhaps we could change the orchestrate runner to look for state-like return structures and cue off of those.

--  
Colton Myers
--
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.

Steve Hajducko

unread,
Jun 24, 2016, 11:53:22 AM6/24/16
to salt-...@googlegroups.com
Agreed - I think it's an impossible task to define 'failure' for a runner or exec module, except in the base sense of 'It exited with a non-0 exit code', and I don't think that would fit enough use cases for scenarios where you may say 'I ran successfully, but wasn't able to do what you wanted me to'.

If the runner or exec mod returns the same structure as the state mods do, I think that should be good enough.  It'd be nice to key the runner or exec mod into the fact that it's running via the orchestrate - then a mod/runner author could return from the function differently depending on execution context.  Then just keep the current process that if the runner/execmod doesn't return the correct structure, just assume it worked.

Colton Myers

unread,
Jun 24, 2016, 12:32:55 PM6/24/16
to salt-...@googlegroups.com
Good ideas, I think. It might be useful to move this discussion onto an issue on Github so it's not forgotten.

--  
Colton Myers
Reply all
Reply to author
Forward
0 new messages