-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Labels
bugbroken, incorrect, or confusing behaviorbroken, incorrect, or confusing behaviorhelp-wantedCommunity help is needed to resolve thisCommunity help is needed to resolve thisseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone
Description
Description of Issue/Question
Thorium's runner.cmd is not building arguments properly (I guess).
Setup
Create something like this in some example sls under thorium_roots:
some_orchestrate:
runner.cmd:
- func: state.orchestrate
- arg:
- some.sls.file
- kwargs:
saltenv: server
For convenience setup rawfile_json
Steps to Reproduce Issue
Send some events to trigger thorium
saltenv will not be passed to the state.orchestrate
The event dump:
{"tag": "salt/run/20181124220603287357/new", "data": {"fun": "runner.state.orchestrate", "fun_args": ["some.sls.file", {"orchestration_jid": "20181124220603287357"}]
Trying to:
some_orchestrate:
runner.cmd:
- func: state.orchestrate
- arg:
- some.sls.file
- saltenv: server
Brings me closer to solution but still doesn't work
{"tag": "salt/run/20181124221236510322/new", "data": {"fun": "runner.state.orchestrate", "fun_args": ["some.sls.file", {"saltenv": "server"}, {"orchestration_jid": "20181124221236510322"}], "jid": "20181124221236510322", "user": "root", "_stamp": "2018-11-24T21:12:37.190855"}}
Mind separated {'orchestration_jid': ...}
How do I get this working (workaround)?
I'm guessing the problem is here (thorium/runner.py):
local_opts = {}
local_opts.update(__opts__)
local_opts['async'] = True # ensure this will be run asynchronous
local_opts.update({
'fun': func,
'arg': arg,
'kwarg': kwargs
})
runner = salt.runner.Runner(local_opts)
runner.run()
Could you give me hints or code reference where these options are properly handled so that I'll fix it myself?
Versions Report
Salt Version:
Salt: 2018.3.3
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.5.3
docker-py: 3.5.1
gitdb: 2.0.0
gitpython: 2.1.1
ioflo: Not Installed
Jinja2: 2.9.4
libgit2: 0.24.5
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: 0.24.2
Python: 2.7.13 (default, Sep 26 2018, 18:42:22)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: 16.0.2
RAET: Not Installed
smmap: 2.0.1
timelib: Not Installed
Tornado: 4.4.3
ZMQ: 4.2.1
System Versions:
dist: debian 9.6
locale: UTF-8
machine: x86_64
release: 4.9.0-8-amd64
system: Linux
version: debian 9.6
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugbroken, incorrect, or confusing behaviorbroken, incorrect, or confusing behaviorhelp-wantedCommunity help is needed to resolve thisCommunity help is needed to resolve thisseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around3rd level, incorrect or bad functionality, confusing and lacks a work around