[BUG] pillar system does not find foo/init.sls when foo.sls exists on a different git_pillar repo
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
With two different pillar_roots (both git_pillar), both have pillar matches that call for foo to be included in pillar for specific minions
Example:
main:
'*.db.mydomain.com'
- foo
In one git_pillar repo, foo.sls exists. In the other repo, foo/init.sls exists.
In this situation, the pillar data from foo/init.sls never makes it to the minion.
Renaming foo/init.sls to foo.sls on the second repo fixes the problem.
Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)
Please be as specific as possible and give set-up details.
- on-prem machine
- VM (Virtualbox, KVM, etc. please specify)
- VM running on a cloud service, please be explicit and add details
- container (Kubernetes, Docker, containerd, etc. please specify)
- or a combination, please be explicit
- jails if it is FreeBSD
- classic packaging
- onedir packaging
- used bootstrap to install
Steps to Reproduce the behavior
- Setup two different git_pillar repos
- Create
foo.slsin one repo, andfoo/init.slsin the other repo, make them have different data inside - In both top.sls files, make a match for the minion and call out
- fooas the data - Make
pillar.itemscalls to matching minions - Observe that data from
foo/init.slsdoes not make it into the minion's pillar data - Rename
foo/init.slstofoo.slsin the second repo - Observe that subsequent
pillar.itemscalls now show the missing data
Expected behavior
When - foo is called out in the pillar top.sls, then foo/init.sls and foo.sls should be read if they exist in the pillarenv, and the existence of one of them in one pillar repo should not block the other in a different repo
Versions Report
3006.3
Additional context
Add any other context about the problem here.
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 by reproducing the two git_pillar repository setup with matching top.sls entries and compare pillar.items output before and after renaming foo/init.sls to foo.sls. Trace how the pillar top.sls request for foo resolves files across the pillarenv, then verify that both foo.sls and foo/init.sls contribute data without one repository blocking the other.
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
- 35/100