file.recurse see only last mounted hgfs repository
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
When I setup more than one source in hgfs_remotes (with different mountpoints) than file.recurse with all these mountpoints except the last gives an error Recurse failed: none of the specified sources were found on apply
Setup
config in master:
fileserver_backend:
- roots
- hgfs
hgfs_remotes:
- file:///repos/service1:
- mountpoint: service1
- file:///repos/service2:
- mountpoint: service2
states/service1.sls:
service1:
file.recurse:
- name: /target_dir/service1
- source: salt://service1
- makedirs: True
- clean: True
states/service2.sls:
service2:
file.recurse:
- name: /target_dir/service2
- source: salt://service2
- makedirs: True
- clean: True
Steps to Reproduce the behavior
Add more than one source in hgfs_remotes and try to use first of them in file.recurse. It is service1 in my example.
Important to note that salt '*' cp.list_master_dirs shows all mountpoints and their content properly:
- service1
- service1/dir1
- service1/dir2
- service2
- service2/dir1
- service2/dir2
But salt '*' state.apply service1 fails and salt '*' state.apply service2works
If I comment out second hgfs_remotes source or swap places of repos in hgfs_remotes then after master restart salt '*' state.apply service1works.
Expected behavior
salt '*' state.apply service1 works without error
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Salt Version:
Salt: 3005
Dependency Versions:
cffi: 1.15.1
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 3.0.1
libgit2: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.4
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: 2.21
pycrypto: Not Installed
pycryptodome: 3.15.0
pygit2: Not Installed
Python: 3.7.13 (default, Jul 5 2022, 09:57:23)
python-gnupg: Not Installed
PyYAML: 5.4.1
PyZMQ: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: Not Installed
System Versions:
dist: freebsd 13.1
locale: UTF-8
machine: amd64
release: 13.1-RELEASE
system: FreeBSD
version: FreeBSD 13.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the fileserver hgfs backend and the handling of hgfs_remotes, then compare the source lookup used by file.recurse with cp.list_master_dirs. Reproduce the setup with service1 and service2 mountpoints and apply both states. Done means file.recurse finds and applies content from every configured mountpoint, not only the last one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100