New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot render pillar SLS with more than 98 if/elif statements #43112
Comments
This appears to be a limitation of jinja2.
Can you open a bug upstream with them? Thanks, |
Done. #759 |
Thank! |
I've just fixed this upstream - pallets/jinja#760. The fix will go into 2.10 and 2.9.7 (not yet released). However, since you are using Jinja (2.6, a six-year-old version) from OS packages, you'd probably need to ask distros to backport the fix or salt needs to somehow use a more recent Jinja version... Or maybe you can avoid generating that much |
We provide the oldest supported version in our repos usually, newer versions need to be supplied by the distro or by using pip to install. |
I will try it through pip when it is released. Thanks both, |
Description of Issue/Question
Having a pillar with the following content:
Fails with the following error message:
On the other hand, if one of the
elif
statement line is removed (keeping 98elif
), the sls is compiled without errors.It seems there is a hard limit on
elif
statements in the jinja templating because the following pillar doesn't fail:Setup
test.sls
Steps to Reproduce Issue
Create a pillar with the above content and assign it to a minion. After that, try to list the pillar items of a minion:
The error will be raise. After that, remove the last
elif
line (for example):The sls is compiled.
Versions Report
(Provided by running
salt --versions-report
. Please also mention any differences in master/minion versions.)Tested in two different salt versions:
Same behaviour in both.
The text was updated successfully, but these errors were encountered: