I'm working on configuring a group of 40 servers to be managed by SaltStack. I'm testing with just one minion at the moment, which I have successfully added to the master. For simplicity, I'm using the latest version of salt and salt-minion from the Ubuntu 14.04.1 package repository on the respective machines.

I have what appears to be a sane configuration and directory structure, however whenever I try running salt '*' state.highstate, I get an error that the top file does not match the nodes. If I try manually running a state file with salt '*' state.sls worker.users, it errors that no such file exists. Directory structure and files are below.

Any idea why this is not working?

root@salt-master:/srv/salt# tree /srv/salt
├── worker
│   └── users.sls
└── top.sls

1 directory, 4 files

root@master:/srv/salt# salt '*' state.highstate
    State: - no
    Name:      states
    Function:  None
        Result:    False
        Comment:   No Top file or external nodes data matches found

Succeeded: 0
Failed:    1
Total:     1

The contents of the relevant files:

root@master:/srv/salt# cat top.sls
    - worker.users
root@master:/srv/salt# cat worker/users.sls
        - fullname: Service Account
        - shell: /bin/bash
        - home: /home/worker

        - fullname: Search Admin Account
        - shell: /bin/bash
        - home: /home/admin

File root is defined as follows in the master and I've restarted all the machines:

    - /srv/salt
  • What's in top.sls, it seems like you gave two different outputs: ` base: '*': - search ` – c4urself Dec 14 '14 at 23:24
  • My bad. I had changed some of the names for simplicity. I've updated the question. – David Adrian Dec 15 '14 at 0:23
  • Can you run: (on master) salt-run manage.up salt '*' test.ping – c4urself Dec 15 '14 at 0:35
  • Yes, and my one node responds in both. – David Adrian Dec 15 '14 at 2:20
  • have you restarted salt-master and tried to run it in debug mode salt-master -l debug – Mike Dec 15 '14 at 3:26

In general, when debugging state.highstate you should try:

salt (from master)
salt-call (from minion)

Minion is reachable

Versions match (recommended)

  • Make sure the version of the minion/master packages match. On Ubuntu for example (dpkg -l salt-minion on the minion and dpkg -l salt-master on the master).

Minion is in correct state

  • Clear the cache on the minion completely rm -rm /var/cache/salt/minion/files/base/*
  • Check to make sure the minion has the right grains salt-call grains.items

Check logs

  • salt-call -l debug state.highstate -- Check to see if you can catch more information about the error using "debug" mode
  • Check /var/log/salt/minion.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.