location custom master_job_cache

17 views
Skip to first unread message

Jakub Pinkas

unread,
Jun 19, 2015, 5:23:37 AM6/19/15
to salt-...@googlegroups.com
Hello,

i play around with returners to determine which will be better.

First I started with postgres returner, but I wanted something to report just from master, so I switched to postgres_local_cache, but we wanted to tweak some things and put it for test.

Here now goes my problem, we have returner ready, but where I place it since it is for master?

salt://_returners/my_returner.py - doesnt work.

Thanks for any clue,


Colton Myers

unread,
Jun 26, 2015, 5:22:16 PM6/26/15
to salt-...@googlegroups.com
You'll probably have to place it in the salt installation directory, under `salt/returners/`. I think there's an open issue for making the `salt://_*` directories sync to the master process as well.

--
Colton Myers
Platform Engineer, SaltStack
@basepi on Twitter/Github/IRC

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

Jakub Pinkas

unread,
Jun 29, 2015, 3:55:21 AM6/29/15
to salt-...@googlegroups.com
I'am sorry must be really tired when i wrote the question and I provide some wrong information.

I tried to edit master_job_cache, but I don't know where I should place edited file for master to recognize it.

"Failed to allocate a jid. The requested returner 'postgres_local_cache_custom' could not be loaded.".

If I clone git repository on test server farm and place it under salt/returners and run new install it compile new retuner into salt and everything seems to work as expected.

But what I want to know is where I could place it to master recognize custom master_job_cache and how to set it in configuration file for master since on production we want to use only package version:

                  Salt: 2015.5.0
                Python: 2.7.9 (default, Mar  1 2015, 12:57:24)
                Jinja2: 2.7.3
              M2Crypto: 0.21.1
        msgpack-python: 0.1.10
          msgpack-pure: Not Installed
              pycrypto: 2.6.1
               libnacl: Not Installed
                PyYAML: 3.11
                 ioflo: Not Installed
                 PyZMQ: 14.4.0
                  RAET: Not Installed
                   ZMQ: 4.0.5
                  Mako: Not Installed
 Debian source package: 2015.5.0+ds-1~bpo70+1 


Thanks in advance,


Dne pátek 26. června 2015 23:22:16 UTC+2 basepi napsal(a):

Colton Myers

unread,
Jul 14, 2015, 6:30:49 PM7/14/15
to salt-...@googlegroups.com
Try renaming the returner module (you may also have to rename its __virtualname__ in the code so it doesn't conflict) and then placing in the salt installation directory as I mentioned before, and restart the master. Also be sure the dependencies for the returner are installed so it will load properly.

--
Colton Myers
Platform Engineer, SaltStack
@basepi on Twitter/Github/IRC
Reply all
Reply to author
Forward
0 new messages