Open dapak opened 2 years ago
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey. Please be sure to review our Code of Conduct. Also, check out some of our community resources including:
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!
This was discussed on Slack, and this is not what the problem was. Indeed, this is the config that you said worked correctly,
What wasn't working was using __env__
in the file_roots
.
@OrangeDog
This config does not work correctly per the output of fileserver.file_list
for the dev
environment above. It should have the vim
formula synced to it, assuming all_saltenvs
is designed to sync a resource to all salt environments. Like many things, the documentation isn't 100% clear on that so I could be quite wrong.
The __env__
issue I think might be related to this problem. I can file a separate bug for that if you prefer, but I'm still having the problem with specifying even dev
in and not even using a configuration with __env__
.
Oh, I thought it was solved in the end. Still no idea why this doesn't work for you then.
@OrangeDog
Unfortunately nope, I'm still scratching my head on this one. I feel like I've tried every combination of configuration at this point to get this to work and I've given up. I've been doing configuration management work with other tooling for over a decade and Salt's breaking my brain on this particular feature.
Hi everybody, I am also struggling with this. It is very strange. I have a simple master config combining roots
and git
fileserver backends. I use gitfs
for a bunch of formulas. But when I run salt
to apply states with a different saltenv
(other than base
) it is going to crash and burn - all my states from formulas are "not available" anymore.
Specified SLS postgres in saltenv staging is not available on the salt master or through a configured fileserver
Master config snippet:
fileserver_backend:
- roots
- git
file_roots:
staging:
- /staging/path/to/my/salt/states
prod:
- /prod/path/to/my/salt/states
gitfs_provider: pygit2
gitfs_remotes:
- https://github.com/saltstack-formulas/postgres-formula:
- all_saltenvs: master
pillar_roots:
staging:
- /staging/path/to/my/salt/pillar
prod:
- /prod/path/to/my/salt/pillar
I'm still having the same problem with salt-master 3006.1
. The all_saltenvs
option is not working at all.
After a lot of trail and error I was able to figure out two things:
gitfs
cache./var/cache/salt/master/gitfs
.salt-run fileserver.file_list saltenv=development
suddenly had an output after deleting the cache manually.ref
for every saltenv
I use.Here is the full config I use that works for me:
fileserver_backend:
- roots
- gitfs
gitfs_provider: pygit2
gitfs_disable_saltenv_mapping: True
top_file_merging_strategy: same
pillar_roots:
__env__:
- /srv/salt/pillar
file_roots:
__env__:
- /srv/salt/states
gitfs_remotes:
- https://github.com/saltstack-formulas/letsencrypt-formula.git:
- saltenv:
- development:
- ref: v3.2.0
- production:
- ref: v3.2.0
- test:
- ref: v3.2.0
Description When utilizing the
all_saltenvs
option for a gitfs remote resource, you would expect that the resource would be synced to all environments identified by gitfs specified byfile_roots
in the master configuration. The resource however is only synced to thebase
environment.Setup The following is the master configuration:
The following is the additional minion configuration:
The following is the directory structure of
/srv/salt
:The contents of the
states/top.sls
:Please be as specific as possible and give set-up details.
Steps to Reproduce the behavior The above configuration syncs the
vim
formula resource to the base environment correctly:It does not sync the resource to the
dev
environment:Additional list of the environments on the fileserver:
Expected behavior I would expect that the
vim
formula also be present within thedev
environment.Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.) ```yaml Salt Version: Salt: 3004.1 Dependency Versions: cffi: 1.11.5 cherrypy: unknown dateutil: 2.6.1 docker-py: Not Installed gitdb: Not Installed gitpython: Not Installed Jinja2: 2.10.1 libgit2: 0.26.8 M2Crypto: 0.35.2 Mako: Not Installed msgpack: 0.6.2 msgpack-pure: Not Installed mysql-python: Not Installed pycparser: 2.14 pycrypto: Not Installed pycryptodome: Not Installed pygit2: 0.26.4 Python: 3.6.8 (default, Nov 10 2021, 06:50:23) python-gnupg: Not Installed PyYAML: 3.12 PyZMQ: 19.0.0 smmap: Not Installed timelib: Not Installed Tornado: 4.5.3 ZMQ: 4.3.4 System Versions: dist: oracle 8.5 locale: UTF-8 machine: x86_64 release: 5.4.17-2136.302.7.2.2.el8uek.x86_64 system: Linux version: Oracle Linux Server 8.5 ```