Search code examples
gitnfssalt-projectgitfs

"No Top file or external nodes data matches found" setting up gitfs with SaltStack


I've setup git on an nfs server. The salt master auto-mounts the folder containing the git repository on boot. I have copied .sls files, templates and scripts to the git directory and added them to git.

I have added the following to the master config file, according to the guide here:

fileserver_backend:
  - git

gitfs_remotes:
  - file:///mnt/git-repo

I am in doubt about what to set file_roots to, but have tried both

- /srv/salt

and

- /mnt/git-repo

with same result: "No Top file or external nodes data matches found"

SaltStack version is 0.17.4, OS is SLES 11.2.

Does anyone know where I have gone wrong?


Solution

  • Cloning the repository gave the following message "Warning: You appear to have cloned an empty repository". (thanks @Jason Zhu) It did this because although the files were added to the repository, they were not committed.

    To solve the problem I:

    1. removed file_roots from the master config file, since it is not needed when you use gitfs (thanks @basepi)

    2. restarted the salt-master, to enforce changes to master config file (thanks @Utah_Dave)

    3. committed the added files to the repository