salt icon indicating copy to clipboard operation
salt copied to clipboard

salt is looking for outputters in /var/cache/salt/minion/extmods/output not /var/cache/salt/minion/extmods/outputputters

Open arthurzenika opened this issue 12 years ago • 9 comments

My custom outputter doesn't seem to work even though I am sure that it was shiped during "salt-call saltutil.sync_all" and is present in /var/cache/salt/minion/extmods/outputputters (but no .pyc so it hasn't been loaded).

Looking at a call with log all, I can see

[TRACE   ] loading output in ['/var/cache/salt/minion/extmods/output', '/usr/lib/python2.7/dist-packages/salt/output']

Is this list not missing /var/cache/salt/minion/extmods/outputputters

Taking a look at loader.py where there might be a problem in def outputters.

arthurzenika avatar Nov 03 '14 09:11 arthurzenika

A dirty hack cd /var/cache/salt/minion/extmods/; ln -s outputters/ output get salt to run the code (but is clearly not the right solution)

arthurzenika avatar Nov 03 '14 09:11 arthurzenika

So sync_all is shipping to the wrong directory? We should get this fixed. Seems like /var/cache/salt/minion/extmods/output is the right place, since the built-in outputters are in salt/output/.

basepi avatar Nov 03 '14 19:11 basepi

For anyone getting this bug, this is the sls workaround :

 make symlink to fix outputter bug:
    file.symlink:
        - name: /var/cache/salt/minion/extmods/output
        - target : /var/cache/salt/minion/extmods/outputters

arthurzenika avatar Nov 26 '14 13:11 arthurzenika

Glad you were able to find a work around! Can you post the output of salt --versions-report?

rallytime avatar Jan 15 '15 07:01 rallytime

# salt-call --versions-report
           Salt: 2014.7.0
         Python: 2.7.3 (default, Mar 13 2014, 11:03:55)
         Jinja2: 2.6
       M2Crypto: 0.21.1
 msgpack-python: 0.1.10
   msgpack-pure: Not Installed
       pycrypto: 2.6
        libnacl: Not Installed
         PyYAML: 3.10
          ioflo: Not Installed
          PyZMQ: 13.1.0
           RAET: Not Installed
            ZMQ: 3.2.3
           Mako: 0.7.0

but at the time we might have been in 2014.1

arthurzenika avatar Jan 15 '15 09:01 arthurzenika

Same problem here.

$ salt-call --versions-report
           Salt: 2014.7.0
         Python: 2.7.5 (default, Jun 17 2014, 18:11:42)
         Jinja2: 2.7.2
       M2Crypto: 0.21.1
 msgpack-python: 0.4.2
   msgpack-pure: Not Installed
       pycrypto: 2.6.1
        libnacl: Not Installed
         PyYAML: 3.10
          ioflo: Not Installed
          PyZMQ: 14.3.1
           RAET: Not Installed
            ZMQ: 3.2.4
           Mako: Not Installed

sysless avatar Jan 29 '15 18:01 sysless

bump on this bug...

arthurzenika avatar May 13 '15 15:05 arthurzenika

Thanks for the bump here @arthurlogilab. I've added some extra labels here to help get some more eyes on it.

rallytime avatar May 13 '15 15:05 rallytime

@arthurlogilab and @HiTeN - I've fixed this problem in #27483. Note: If you're using _outputters in wherever your file_roots is pointed, you'll need to change it to _output. This pull request fixes the way we're synching the custom outputters to the minions, not the loader picking them up. This is because all of the custom dynamic modules match their directory name in the salt tree (_states matches salt/states and _modules matches salt/modules), so the outputters should be consistent there as well.

Another thing to note as this only works on the minion side. Until a solution for #12511 is found, master-side custom outputters will not work, similarly to custom runners.

Anyway, if you change the name of your directory to _output and do either a saltutil.sync_all or saltuitl.sync_outputters, the loader will pick it up the minion-side custom outputter.

rallytime avatar Sep 28 '15 23:09 rallytime