Open max-arnold opened 6 years ago
@max-arnold Thank you for reporting this.
Any clues on how to fix this?
.venv ❯ salt --version
salt 2019.2.0 (Fluorine)
I faced this problem yesterday. It highly impacts local development process.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Still valid
Thank you for updating this issue. It is no longer marked as stale.
I can work on a fix if the @dwoz or someone at Salt can offer some guidance.
@amendlik looking to find someone who can give that guidance, thank you!
@amendlik so I looked into the code a bit as well, if you're still interested in takling this ( / but also writing this here as a note to myself a bit):
i found out that
[DEBUG ] Could not LazyLoad slsutil.renderer: 'slsutil.renderer' is not available.
[DEBUG ] Performing shimmed, blocking command as follows:
slsutil.renderer /tmp/map.py
basically means: "i did not find a ssh/wrapper
for slsutil, i will instead copy a kind of shim over to the node and try to execute everything there"
the shimmed version will actually work if that target file is on the host; so my test here with /tmp/map.py
worked because i threw that file over onto that node. however salt://
paths will obviously not work.
a starting point to implement that slsutil
to make it LazyLoad-able is the folder salt/client/ssh/wrapper/
, create a file salt/client/ssh/wrapper/slsutil.py
:
import logging
log = logging.getLogger(__name__)
def renderer(path=None, string=None, default_renderer="jinja|yaml", **kwargs):
log.info("whoohoo, we found the starting point")
and then I suppose gather inspiration from the other salt/client/ssh/wrappers
Description of Issue/Question
The recommended ways to debug templates are (as seen in the Slack chat):
Unfortunately, I was unable to make it work over
salt-ssh
:Third way also doesn't work:
Salt version
2018.3.2
on Py3.The question is: what is the best (and documented) way to debug templates, which works consistently across
salt
,salt-call
andsalt-ssh
(and maybesalt-run
)?