FAQ
I have a small module that manipulates SSH public keys. The problem I am
having is that the pillar data gets stale and there doesn't appear to be
any way to refresh it via the module.

Currently the module calls this command to get the pillar value:

user = __salt__['pillar.get']("some_user")

That works fine and dandy. However, if I change what "some_user" pillar
value is on the master and re-run the module, it uses the stale value. The
only way I can find to get around this is to trigger a pillar refresh,
either via a highstate or a saltutil.refresh_pillar.

Now, it appears to me that I can include a saltutil function to refresh the
pillar before the function is called, but that doesn't seem to work.

I added the follow and tested it:

__salt__['saltutil.refresh_pillar']
user = __salt__['pillar.get']("some_user")

It appears to make no difference. The stale value is maintained until
either a highstate or a saltutil.refresh_pillar.

Minion is running:
            Salt: 2014.1.0
          Python: 2.6.6 (r266:84292, Nov 22 2013, 12:16:22)
          Jinja2: 2.2.1
        M2Crypto: 0.20.2
  msgpack-python: 0.1.13
    msgpack-pure: Not Installed
        pycrypto: 2.0.1
          PyYAML: 3.10
           PyZMQ: 2.2.0.1
             ZMQ: 3.2.4

Master is running:
            Salt: 2014.1.0
          Python: 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
          Jinja2: 2.2.1
        M2Crypto: 0.22
  msgpack-python: 0.4.2
    msgpack-pure: Not Installed
        pycrypto: 2.6.1
          PyYAML: 3.11
           PyZMQ: 14.3.1
             ZMQ: 4.0.4

--
Stephen Wood
www.heystephenwood.com

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
groupsalt-users @
postedOct 12, '14 at 12:41a
activeOct 26, '14 at 12:11p
posts3
users3

People

Translate

site design / logo © 2022 Grokbase