[BUG][V3005] Pillar-root doesnt work
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
Related issue: https://github.com/saltstack/salt/issues/16873
The --pillar-root option doesn't work. Salt is always sourcing the standard pillar-root
Setup
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
create a pillar test in /srv/salt/pillar/config.sls but not in another pillar-root :
(cluster)-[xxxx@admin ~]$ grep -A1 toto: /srv/salt/pillar/config.sls
toto:
tutu: test
(cluster)-[xxxx@admin ~]$ grep -A1 toto: /opt/another_salt_pillar_dir/config.sls
(cluster)-[xxxx@admin ~]$
Expected behavior
Run:
This is normal:
(cluster)-[xxxx@admin1 ~] $ salt-call pillar.get toto
local:
----------
tutu:
test
This is not normal and should be return nothing:
(cluster)-[xxxx@admin1 ~] $ salt-call --pillar-root=/opt/another_salt_pillar_dir/ pillar.get toto
local:
----------
tutu:
test
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.9.1
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 2.11.1
libgit2: Not Installed
M2Crypto: 0.35.2
Mako: Not Installed
msgpack: 0.6.2
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: Not Installed
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.6.8 (default, Nov 16 2020, 16:55:22)
python-gnupg: Not Installed
PyYAML: 3.13
PyZMQ: 18.0.1
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.1.4
System Versions:
dist: centos 7 Core
locale: UTF-8
machine: x86_64
release: 3.10.0-1160.76.1.el7.x86_64
system: Linux
version: CentOS Linux 7 Core
Additional context
Nothing to Add
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 salt-call command path for the --pillar-root option and compare its pillar lookup with the paths shown in the reproduction. Use /srv/salt/pillar/config.sls and /opt/another_salt_pillar_dir/config.sls to verify which source is read. Done means salt-call --pillar-root=/opt/another_salt_pillar_dir/ pillar.get toto does not return the value from the standard pillar root.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100