Cannot pillar.get but pillar.items get the data

13 views
Skip to first unread message

Pier B.

unread,
Jun 22, 2017, 2:11:37 PM6/22/17
to Salt-users
Hi,


I am experiencing something "strange" with pillar data. I use gitfs as external pillar and did not exprience any issue at all once correctly setup, however today I added some new data to my pillar source but I cannot use the pillar.get function to get it, although pillar.items display the correct data .....


Here are some information :

Salt_Pillar/testBed$ cat top.sls
base:
 
'*':
   
- role.directory_server.opendj
   
- common.ntp_server


Salt_Pillar/testBed$ cat role/directory_server/opendj.sls
opendj
:
  vip
: NONE


Salt_Pillar/testBed$ cat common/ntp_server.sls
## NTP server pillar data
ntp_server
:
  name
: ntp


And my tests:

server

also :
root@salt [~]: /usr/bin/salt "server"  pillar.get ntp_server:name
server:
    ntp
root@salt [~]: /usr/bin/salt "
server"  pillar.get opendj:vip
server:
root@salt [~]:

And :
root@salt [~]: /usr/bin/salt "server"  pillar.items
server:
[...]
    ntp_server:
        ----------
        name:
            ntp
    opendj:
        ----------
        vip:
            NONE
[...]
root@salt [~]:



Any ideas why I cannot get the valu for opendj:vip from pillar.get function ?



PierB

Pier B.

unread,
Jun 22, 2017, 2:13:08 PM6/22/17
to Salt-users
Sorry I forgot version details :

Master :
root@salt [~]: salt-master --version
salt-master 2016.11.5 (Carbon)

minion:
root@server [sbin]: salt-call --version
salt-call 2016.11.5 (Carbon)


Seth House

unread,
Jun 22, 2017, 2:44:06 PM6/22/17
to salt users list
Try manually refreshing Pillar via `salt-call saltutil.refresh_pillar`
first. I seem to recall a bug with `pillar.items` / `pillar.get` that
sounds similar to this.

https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.refresh_pillar
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/salt-users/81b60e4d-a732-433a-8e78-ade0b9dd15b2%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

Pier B.

unread,
Jun 22, 2017, 5:28:31 PM6/22/17
to Salt-users, se...@eseth.com
Thanks Seth,

I knew I was just forgetting something easy (it's not like I did this a thousand times ...), and yes that did the trick .... silly me.


Thanks again
Reply all
Reply to author
Forward
0 new messages