pillar do not return anything

 SaltStack Certified Engineer

Chapter : Lecture: Pillar

------------------------------

I tried to setup pillar but it is not returning any value. What I am doing wrong ? How do I troubleshoot it with debug ?

root@salt:/srv/pillar# salt '*' saltutil.refresh_pillar

minion1:

True

minion2:

True

salt:

True

root@salt:/srv/pillar# salt '*' pillar.items

salt:

----------

minion2:

----------

minion1:

----------

  • post-author-pic
    Elle K
    12-18-2018

    Can you supply your pillar file and the top file for your pillar data?

    I would first double-check any formatting -- getting something as small as the spacing in front a dictionary  wrong can cause Salt not to read pillar data.

  • post-author-pic
    Yash M
    12-18-2018

    I think I found the issue with top.sls


     # cat /srv/pillar/top.sls

    base:

    'minion*':

    - mysql:


    mysql: should be mysql   I wish it could have generated some error.

    By the way, how can you duebug such pillar issue. I mean , if there is any command or method. Do you have a chapter on this item --debugging ?


  • post-author-pic
    Elle K
    12-19-2018

    To debug, you need to first stop the salt-master service, then restart it to run in this foreground with:

    salt-master -l debug

    Then, run the troublesome command as normal in a new window and watch the output of the debug window for the errors.

    There's also an option for debugging on the minion itself with:

    salt-minion -l debug

    Although for pillar specifically, you'll want to use the salt-master command.

Looking For Team Training?

Learn More