salt-run and custom runners

272 views
Skip to first unread message

Mark Gaylard

unread,
Oct 21, 2014, 3:06:25 AM10/21/14
to salt-...@googlegroups.com
If I write a custom runner and put it on the master in a dir specified by the runner_dirs config setting, I can run 'salt-run xxx.xxx' on the master and it works. If I run the same command on a minion I get 'Function xxx.xxx is unavailable'. Do I need to do anything to the master to make this work? Am I using salt-run correctly? If not, what is the correct way to trigger a runner from a minion?

Thanks,

Mark

Valentin Bud

unread,
Oct 21, 2014, 8:13:02 AM10/21/14
to salt-...@googlegroups.com
Hello Mark,

I don't think you can run a runner on a minion. From the docs [1]:

"Salt runners work similarly to Salt execution modules however they execute on the Salt master itself instead of remote Salt minions."


Best,
Valentin

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

Mark Gaylard

unread,
Oct 21, 2014, 6:03:19 PM10/21/14
to salt-...@googlegroups.com
Hi Valentin.

Yeah, I read that sentence in the docs but interpreted it as 'initiated from the minion but executed on the master'. It isn't super clear because I can run (for example) 'salt-run doc.runner' on a minion and get output, but I'm guessing that is because those runners are part of the distro, not because it is executing on the master.

What I am actually after is some way to remotely trigger a runner on the master. I think I might need to use a events/reactors to do what I want. Or look at the salt-api stuff.

Thanks,

Mark.

Valentin Bud

unread,
Oct 22, 2014, 5:01:01 AM10/22/14
to salt-...@googlegroups.com
Hi Mark,

I use reactors to trigger runners. I am sure you can use the Salt API, but
it seems overkill for this job. 

Until now the reactors worked flawlessly.

Best,
Valentin

Daniel Jagszent

unread,
Oct 22, 2014, 9:20:02 AM10/22/14
to salt-...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages