salt icon indicating copy to clipboard operation
salt copied to clipboard

jobs.lookup_jid fails due to salt.output.get_outputter missing

Open l2ol33rt opened this issue 14 years ago • 3 comments

Seems that the method salt.output.get_outputter is missing:

$ salt-run jobs.lookup_jid 20121026095322267311
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 88, in salt_run
    client.run()
  File "/usr/lib/python2.6/site-packages/salt/cli/__init__.py", line 256, in run
    runner.run()
  File "/usr/lib/python2.6/site-packages/salt/runner.py", line 79, in run
    self.opts['fun'], self.opts['arg'])
  File "/usr/lib/python2.6/site-packages/salt/runner.py", line 45, in cmd
    return self.functions[fun](*arg)
  File "/usr/lib/python2.6/site-packages/salt/runners/jobs.py", line 65, in lookup_jid
    printout = salt.output.get_outputter(data.get('out', None))
AttributeError: 'module' object has no attribute 'get_outputter'

I've tried to fix this on my own but am having an issue with opts not being set in highstate outputter. Thought I'd just put this issue in and see if anyone could help.

As far as I got: 1c92307c3892b1bd31a4e68e11b49a2ed2d64c3e

Now if I try to use the salt.output.highstate.output I get the following error:
$ salt-run jobs.lookup_jid 20121026095322267311
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 88, in salt_run
    client.run()
  File "/usr/lib/python2.6/site-packages/salt/cli/__init__.py", line 256, in run
    runner.run()
  File "/usr/lib/python2.6/site-packages/salt/runner.py", line 79, in run
    self.opts['fun'], self.opts['arg'])
  File "/usr/lib/python2.6/site-packages/salt/runner.py", line 45, in cmd
    return self.functions[fun](*arg)
  File "/usr/lib/python2.6/site-packages/salt/runners/jobs.py", line 67, in lookup_jid
    printout({mid: ret[mid]})
  File "/usr/lib/python2.6/site-packages/salt/output/highstate.py", line 17, in output
    colors = salt.utils.get_colors(__opts__.get('color'))
NameError: global name '__opts__' is not defined

l2ol33rt avatar Oct 26 '12 23:10 l2ol33rt

this is off the latest git right? i will get it fixed asap

thatch45 avatar Oct 27 '12 01:10 thatch45

Yep its from the latest dev branch. Thanks Tom!

On Oct 26, 2012, at 6:01 PM, Thomas S Hatch [email protected] wrote:

this is off the latest git right? i will get it fixed asap

— Reply to this email directly or view it on GitHubhttps://github.com/saltstack/salt/issues/2370#issuecomment-9831268.

l2ol33rt avatar Oct 27 '12 01:10 l2ol33rt

Ok, 00e6c15c223f1e69026113b2a40d2795ff4649b3 should do the trick

thatch45 avatar Oct 27 '12 04:10 thatch45