Pillar data not showing up on minions
search cancel

Pillar data not showing up on minions

book

Article ID: 392738

calendar_today

Updated On:

Products

VMware Aria Suite VMware Tanzu Platform Spring Essentials VMware Tanzu Platform

Issue/Introduction

Pillar data is not appearing on minions after updating the information.

Environment

Tanzu Salt - all versions

Aria Config - all versions

SaltProject - all versions

Cause

There are multiple backends available for storing Pillar data, but they should all render valid YAML data when the information is requested. This issue usually occurs due to either a misconfigured data structure in YAML, or a bad reference to Pillar data.

Resolution

 When a user integrates their Salt master with Aria Config/Tanzu Salt, they have two backends available for storing Pillar data, the sseapi backend and the default roots backend. The roots backend is the local file system. By default, Salt will search under the /srv/pillar directory for a top.sls file, which maps maps data in other .sls files to a collection of minions using compound target matching.

 

# Example top.sls
base:
'G@kernel:Linux':
- linux_info # Assigns info in the /srv/pillar/linux_info.sls file to minions running a Linux kernel
'G@kernel:Windows':
- windows_info # Assigns info in the /srv/pillar/windows_info.sls file to minions running Windows kernel
'*':
- common_data # Assigns data in /srv/pillar/common_data.sls to all minions

canary:
'G@kernel:Linux and G@canary:True':
- linux_canary # Uses a compound target with a custom grain to allow a collection of minions access to info in the /srv/pillar/linux_canary.sls file as part of the "canary" environment

In the web UI, Pillar data is assigned to a target group by 

  1. Selecting the target group
  2. Clicking on "Assign Pillar" from the Actions menu
  3. Select the name of the Pillar to assign to the target group

For both instances, Pillar data can be given an environment. For more information on top.sls and environments in Salt, see https://docs.saltproject.io/en/master/topics/targeting/index.html

After assigning the Pillar data to a target, or having updated your local files appropriately, you need to refresh the Pillar data on the minions. This can be done by running saltutil.refresh_pillar function on the minions. 

In the UI,

  1. Click the hamburger menu to the left of the target group name 
  2. Select "Run command"
  3. Fill out the form and select "saltutil.refresh_pillar" as the function
  4. Click "run command" at the bottom

You can then confirm that minions are seeing the data as expected by running a "pillar.items" function in the same fashion as above.

You can also do these steps directly from the Salt master if you have access.

  1. Login to the Salt master
  2. Run salt '*' saltutil.refresh_pillar and wait for returns
    1. You should the minions return "True" as the result
  3. Run salt '*' pillar.items --output=yaml | less
  4. You should see YAML data printed to screen for review. 
    1. Review the information and confirm that you see the expected information for each minion updated.

If you do not see the pillar data on the minions, then there could have been an issue rendering the Pillar data. Review the debug logs on the Salt master under /var/log/salt/master for more information.