Open
clearclaw
opened this issue 12 years ago
•
11 comments
This is with 2014.1:
$ salt-run jobs.active
[ERROR ] An un-handled exception was caught by salt's global exception handler:
KeyError: 'tgt'
Traceback (most recent call last):
File "/usr/local/bin/salt-run", line 10, in
salt_run()
File "/usr/lib/pymodules/python2.7/salt/scripts.py", line 95, in salt_run
client.run()
File "/usr/lib/pymodules/python2.7/salt/cli/init.py", line 357, in run
runner.run()
File "/usr/lib/pymodules/python2.7/salt/runner.py", line 219, in run
self.opts['fun'], self.opts['arg'], self.opts)
File "/usr/lib/pymodules/python2.7/salt/runner.py", line 126, in cmd
return self.functions[fun](*args, **kwargs)
File "/usr/lib/pymodules/python2.7/salt/runners/jobs.py", line 36, in active
ret[job['jid']] = _format_job_instance(job)
File "/usr/lib/pymodules/python2.7/salt/runners/jobs.py", line 178, in _format_job_instance
'Target': job['tgt'],
KeyError: 'tgt'
Traceback (most recent call last):
File "/usr/local/bin/salt-run", line 10, in
salt_run()
File "/usr/lib/pymodules/python2.7/salt/scripts.py", line 95, in salt_run
client.run()
File "/usr/lib/pymodules/python2.7/salt/cli/init.py", line 357, in run
runner.run()
File "/usr/lib/pymodules/python2.7/salt/runner.py", line 219, in run
self.opts['fun'], self.opts['arg'], self.opts)
File "/usr/lib/pymodules/python2.7/salt/runner.py", line 126, in cmd
return self.functions[fun](*args, **kwargs)
File "/usr/lib/pymodules/python2.7/salt/runners/jobs.py", line 36, in active
ret[job['jid']] = _format_job_instance(job)
File "/usr/lib/pymodules/python2.7/salt/runners/jobs.py", line 178, in _format_job_instance
'Target': job['tgt'],
KeyError: 'tgt'
$ echo "Yes, the traceback is repeated twice." > /dev/null
$ salt --versions-report
Salt: 2014.1.0
Python: 2.7.3 (default, Feb 27 2014, 19:58:35)
Jinja2: 2.6
M2Crypto: 0.21.1
msgpack-python: 0.1.10
msgpack-pure: Not Installed
pycrypto: 2.4.1
PyYAML: 3.10
PyZMQ: 13.0.0
ZMQ: 3.2.2
Even after upgrading to 2014.1.1 (and I've verified that the code is as it should be in the associated fix), I'm seeing the same behavior on ubuntu 12.04. Traceback and --versions-report are identical to above.
$ sudo salt-run jobs.active
[ERROR ] An un-handled exception was caught by salt's global exception handler:
KeyError: 'tgt'
Traceback (most recent call last):
File "/usr/bin/salt-run", line 10, in
salt_run()
File "/usr/lib/pymodules/python2.7/salt/scripts.py", line 95, in salt_run
client.run()
File "/usr/lib/pymodules/python2.7/salt/cli/init.py", line 357, in run
runner.run()
File "/usr/lib/pymodules/python2.7/salt/runner.py", line 219, in run
self.opts['fun'], self.opts['arg'], self.opts)
File "/usr/lib/pymodules/python2.7/salt/runner.py", line 126, in cmd
return self.functions[fun](*args, **kwargs)
File "/usr/lib/pymodules/python2.7/salt/runners/jobs.py", line 36, in active
ret[job['jid']] = _format_job_instance(job)
File "/usr/lib/pymodules/python2.7/salt/runners/jobs.py", line 186, in _format_job_instance
'Target': job['tgt'],
KeyError: 'tgt'
Traceback (most recent call last):
File "/usr/bin/salt-run", line 10, in
salt_run()
File "/usr/lib/pymodules/python2.7/salt/scripts.py", line 95, in salt_run
client.run()
File "/usr/lib/pymodules/python2.7/salt/cli/init.py", line 357, in run
runner.run()
File "/usr/lib/pymodules/python2.7/salt/runner.py", line 219, in run
self.opts['fun'], self.opts['arg'], self.opts)
File "/usr/lib/pymodules/python2.7/salt/runner.py", line 126, in cmd
return self.functions[fun](*args, **kwargs)
File "/usr/lib/pymodules/python2.7/salt/runners/jobs.py", line 36, in active
ret[job['jid']] = _format_job_instance(job)
File "/usr/lib/pymodules/python2.7/salt/runners/jobs.py", line 186, in _format_job_instance
'Target': job['tgt'],
KeyError: 'tgt'
$ sudo salt --versions-report
Salt: 2014.1.1
Python: 2.7.3 (default, Feb 27 2014, 19:58:35)
Jinja2: 2.6
M2Crypto: 0.21.1
msgpack-python: 0.1.10
msgpack-pure: Not Installed
pycrypto: 2.4.1
PyYAML: 3.10
PyZMQ: 13.0.0
ZMQ: 3.2.2
This fix is not yet in any of the 2014.1 releases but it should be straightforward to change that line and hopefully eliminate the traceback that you're seeing.
Hi I'm on 2014.1.5 RPM EPEL and I'm getting this stacktrace when running salt-run jobs.active.
The fixed is in https://github.com/saltstack/salt/commit/537f96fe#diff-5ca65b130737a573488760e87b926385R179 based on what @cachedout said, but I don't see it in the 2014.1.5 code.
[ERROR ] An un-handled exception was caught by salt's global exception handler:
KeyError: 'tgt'
Traceback (most recent call last):
File "/usr/bin/salt-run", line 10, in
salt_run()
File "/usr/lib/python2.6/site-packages/salt/scripts.py", line 95, in salt_run
client.run()
File "/usr/lib/python2.6/site-packages/salt/cli/init.py", line 362, in run
runner.run()
File "/usr/lib/python2.6/site-packages/salt/runner.py", line 218, in run
self.opts['fun'], self.opts['arg'], self.opts)
File "/usr/lib/python2.6/site-packages/salt/runner.py", line 125, in cmd
return self.functions[fun](*args, **kwargs)
File "/usr/lib/python2.6/site-packages/salt/runners/jobs.py", line 36, in active
ret[job['jid']] = _format_job_instance(job)
File "/usr/lib/python2.6/site-packages/salt/runners/jobs.py", line 186, in _format_job_instance
'Target': job['tgt'],
KeyError: 'tgt'
Traceback (most recent call last):
File "/usr/bin/salt-run", line 10, in
salt_run()
File "/usr/lib/python2.6/site-packages/salt/scripts.py", line 95, in salt_run
client.run()
File "/usr/lib/python2.6/site-packages/salt/cli/init.py", line 362, in run
runner.run()
File "/usr/lib/python2.6/site-packages/salt/runner.py", line 218, in run
self.opts['fun'], self.opts['arg'], self.opts)
File "/usr/lib/python2.6/site-packages/salt/runner.py", line 125, in cmd
return self.functions[fun](*args, **kwargs)
File "/usr/lib/python2.6/site-packages/salt/runners/jobs.py", line 36, in active
ret[job['jid']] = _format_job_instance(job)
File "/usr/lib/python2.6/site-packages/salt/runners/jobs.py", line 186, in _format_job_instance
'Target': job['tgt'],
KeyError: 'tgt'
From /usr/lib/python2.6/site-packages/salt/runners/jobs.py I still see 'Target': job['tgt'], did the fix get included in 2014.1.5 ?