Closed retrry closed 6 years ago
@retrry, thanks for reporting. I am not sure there is a reasonable way to do this with salt, since the minion requesting the highstate does not know what state the master is in. Your best option may be to wait for the master to finish bootstrapping before setting up any minions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
I faced the same issue, I had to call highstate after VM provisioning but couldn't find a way to wait for gitfs to be available.
If it can help someone, my solution turned out to be a custom script which determines when all remotes listed in the master configs are in cache by looking at /var/cache/salt/master/gitfs/remote_map.txt
.
@h3 It might be better to open a new issue with all of your relevant issue information. That way we can get some fresh eyes on it.
Description of Issue/Question
I'm using Saltstack with Vagrant, but I've hit a problem, where on first run state.highstate fails, because not all gitfs roots are pulled from repository.
I have Salt master configuration, which heavily uses saltstack-formulas and I keep them in git repositories (I have configured 8 gitfs_remotes). All of them are used, when configuring development environment. Vagrant runs state.highstate right after installing it, but salt-master needs time, on first run, to pull all information from git repositories, so state.highstate fails (see attached log). I think salt-master should wait for all gitfs remotes to be available in cache on first run.
I've opened feature request in Vagrant project for ability to set delay before running state.highstate, but maybe it is possible to fix this in Saltstack? https://github.com/mitchellh/vagrant/issues/7053