-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
napalm grains not available during template rendering #181
Comments
Hey there, |
I'll let you know if I need anything else when I'll have time to look into it @syntax-terr0r. In the meantime, feel free to give it a try yourself. :) |
@syntax-terr0r can you check #187 and confirm it solves the issue? |
Issue #181: Re-compile the Pillar after establishing the connection
The fix is released in 2020.10.0, just released on PyPI: https://salt-sproxy.readthedocs.io/en/latest/releases/2020.10.0.html. If any issues, feel free to reopen. |
Hi there, That means that the model grain is still not available during template rendering.
This is the contents of the target-software.sls:
Unfortunately I don't understand enough about the flow of salt-sproxy to be able to determine where this would need to be fixed though. |
I have to correct myself I wasn't aware that not only the pillars are now being re-compiled but also the templates are rendered again after connection to the minion was made. I do get the expected output now.
I'm also not exactly sure why the grains are not available for the first rendering. I was under the impression the grains were being cached so at least on the second run it should have all grains available when first attempting to render the template should it not? |
Hey @syntax-terr0r - can you share your pillar file tree? I can see the error, but I also need to see what you have to understand the issue. |
Hey @mirceaulinic,
From that list, this is what's active at the moment:
The
Apart from that there is only the Does that help? Please let me know if you need any addtl info. Thanks! |
Hi @syntax-terr0r. I see what happens, the error is purely cosmetical, which you can prevent by having |
Hi @mirceaulinic , I will change it back to get rid of the error message now. |
Issue #181: Use cached Grains for the initial Pillar compilation
Describe the bug
Grains collected by the napalm.py script are not available during rendering of pillar SLS files
Steps To Reproduce
I have a minion with the following grains:
adding a test pillar:
result:
Expected behavior
Expect the "bar" pillar data to contain the information of grains['model']
Versions Report
Additional context
It seems that the napalm grains (salt/grains/napalm.py) are only merged into the grains dict after the pillars have been rendered:
After modifying the test.sls like so
these are the grains keys available at SLS rendering:
As you can see it's missing the following keys
which as far as I can see are all gathered in napalm.py
The text was updated successfully, but these errors were encountered: