[BUG] no hard stop when there is a pillar rendering error
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
The error in a pillar file
system_configs:
test_vums_p:
test_vums_p:
check_vums_q:
check_vums_q:
The issue
salt keeps going and executes without a hard stop running states without any pillar data which is quite disturbing.
Why? Because there might be essential data in the pillar file which could easily lead to a reconfiguration of the whole host.
The Output
[CRITICAL] Rendering SLS 'vums-work' failed, render error:
while constructing a mapping
in "<unicode string>", line 2, column 3
found conflicting ID 'test_vums_p'
in "<unicode string>", line 3, column 3
Traceback (most recent call last):
File "/root/src/salt/salt/pillar/__init__.py", line 741, in render_pstate
**defaults)
File "/root/src/salt/salt/template.py", line 101, in compile_template
ret = render(input_data, saltenv, sls, **render_kwargs)
File "/root/src/salt/salt/renderers/yaml.py", line 71, in render
raise SaltRenderError(exc)
SaltRenderError: while constructing a mapping
in "<unicode string>", line 2, column 3
found conflicting ID 'test_vums_p'
in "<unicode string>", line 3, column 3
[CRITICAL] Pillar render error: Rendering SLS 'vums-work' failed. Please see master log for details.
[CRITICAL] Rendering SLS 'vums-work' failed, render error:
while constructing a mapping
in "<unicode string>", line 2, column 3
found conflicting ID 'test_vums_p'
in "<unicode string>", line 3, column 3
Traceback (most recent call last):
File "/root/src/salt/salt/pillar/__init__.py", line 741, in render_pstate
**defaults)
File "/root/src/salt/salt/template.py", line 101, in compile_template
ret = render(input_data, saltenv, sls, **render_kwargs)
File "/root/src/salt/salt/renderers/yaml.py", line 71, in render
raise SaltRenderError(exc)
SaltRenderError: while constructing a mapping
in "<unicode string>", line 2, column 3
found conflicting ID 'test_vums_p'
in "<unicode string>", line 3, column 3
[CRITICAL] Pillar render error: Rendering SLS 'vums-work' failed. Please see master log for details.
###################################################
THE REGULAR SALT OUTPUT
###################################################
Summary for vums-work
-------------
Succeeded: 68 (changed=3)
Failed: 2
-------------
Total states run: 70
Total run time: 20.662 s
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 salt/pillar/init.py at render_pstate, then follow salt/template.py's compile_template and salt/renderers/yaml.py's render path. Reproduce the duplicate-ID pillar error and trace what happens afterward. Done means a pillar rendering error prevents states from executing instead of continuing without pillar data, with a regression test covering the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100