Skip to content
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

[BUG] Unable to manage file: Jinja error: openvpn/macros.jinja using salt-ssh #147

Open
waynegemmell opened this issue Oct 5, 2021 · 14 comments
Labels

Comments

@waynegemmell
Copy link

Your setup

Formula commit hash / release tag

I'm using HEAD on master

Versions reports (master & minion)

Sunning salt-ssh

Salt Version:
          Salt: 3003rc1+348.gd637879696
 
Dependency Versions:
          cffi: Not Installed
      cherrypy: Not Installed
      dateutil: Not Installed
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 2.11.3
       libgit2: Not Installed
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: Not Installed
      pycrypto: Not Installed
  pycryptodome: 3.10.1
        pygit2: Not Installed
        Python: 3.8.10 (default, Jun  2 2021, 10:49:15)
  python-gnupg: Not Installed
        PyYAML: 5.4.1
         PyZMQ: 21.0.2
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.3.3
 
System Versions:
          dist: ubuntu 20.04 focal
        locale: utf-8
       machine: x86_64
       release: 5.11.0-37-generic
        system: Linux
       version: Ubuntu 20.04 focal

Bug details

Describe the bug

The following error happens when trying to apply openvpn formula useing salt-ssh.
Unable to manage file: Jinja error: openvpn/macros.jinja
I have the following in my Saltfile which normally fixes the issue.
- salt://openvpn/macros.jinja

Here's the output

     Comment: Unable to manage file: Jinja error: openvpn/macros.jinja
              /var/tmp/.salt_6cb4b9_salt/running_data/var/cache/salt/minion/files/base/openvpn/files/common_opts.jinja(1):
              ---
              {% from "openvpn/macros.jinja" import multipart_param with context %}    <======================
              
              {%- if config.daemon is defined and config.daemon == True %}
              daemon
              {%- endif -%}
              
              [...]
              ---
              Traceback (most recent call last):
                File "/var/tmp/.salt_6cb4b9_salt/pyall/salt/utils/templates.py", line 501, in render_jinja_tmpl
                  output = template.render(**decoded_context)
                File "/var/tmp/.salt_6cb4b9_salt/pyall/jinja2/environment.py", line 1090, in render
                  self.environment.handle_exception()
                File "/var/tmp/.salt_6cb4b9_salt/pyall/jinja2/environment.py", line 832, in handle_exception
                  reraise(*rewrite_traceback_stack(source=source))
                File "/var/tmp/.salt_6cb4b9_salt/pyall/jinja2/_compat.py", line 28, in reraise
                  raise value.with_traceback(tb)
                File "<template>", line 5, in top-level template code
                File "/var/tmp/.salt_6cb4b9_salt/running_data/var/cache/salt/minion/files/base/openvpn/files/common_opts.jinja", line 1, in top-level template code
                  {% from "openvpn/macros.jinja" import multipart_param with context %}
                File "/var/tmp/.salt_6cb4b9_salt/pyall/salt/utils/jinja.py", line 198, in get_source
                  raise TemplateNotFound(template)
              jinja2.exceptions.TemplateNotFound: openvpn/macros.jinja
@myii
Copy link
Member

myii commented Oct 6, 2021

Thanks for this report, @waynegemmell. This is strange, since we have the newest map.jinja implementation in place here, which was fully tested on salt-ssh as it was put together.

@baby-gnu Any ideas about what is happening here?

@baby-gnu
Copy link
Contributor

baby-gnu commented Oct 6, 2021

Hello @myii and @waynegemmell.

I just made a simple test:

  1. setup a salt-ssh configuration
  2. clone openvpn-formula to ~/.salt/srv/formulas/openvpn-formula
  3. copy ~/.salt/srv/formulas/openvpn-formula/pillar.example to ~/.salt/srv/pillar/openvpn.sls
  4. assign that pillar to my target VM
    base:
      'ipv4:192.168.0.101':
        - match: grain
        - openvpn
  5. execute salt-ssh --output yaml 192.168.0.101 state.show_sls openvpn, which produce the following output:
    192.168.0.101:
      obsolete_openvpn_myclient1_service:
        __env__: base
        __sls__: openvpn.service
        service:
        - name: openvpn@myclient1
        - enable: false
        - dead
        - order: 10004
      obsolete_openvpn_myserver1_service:
        __env__: base
        __sls__: openvpn.service
        service:
        - name: openvpn@myserver1
        - enable: false
        - dead
        - order: 10002
      openvpn_create_dh_512:
        __env__: base
        __sls__: openvpn.dhparams
        cmd:
        - name: '"openssl" dhparam -out "/etc/openvpn/server/dh512.pem" 512'
        - creates: /etc/openvpn/server/dh512.pem
        - require:
          - pkg: openvpn_pkgs
        - run
        - order: 10001
      openvpn_myclient1_service:
        __env__: base
        __sls__: openvpn.service
        service:
        - name: openvpn-client@myclient1
        - enable: true
        - require:
          - pkg: openvpn_pkgs
          - sls: openvpn.install
        - running
        - order: 10005
      openvpn_myserver1_service:
        __env__: base
        __sls__: openvpn.service
        service:
        - name: openvpn-server@myserver1
        - enable: true
        - require:
          - pkg: openvpn_pkgs
          - sls: openvpn.install
        - running
        - order: 10003
      openvpn_pkgs:
        __env__: base
        __sls__: openvpn.install
        pkg:
        - pkgs:
          - openvpn
        - installed
        - order: 10000
salt-ssh --versions-report
Salt Version:
          Salt: 3002.6
 
Dependency Versions:
          cffi: Not Installed
      cherrypy: Not Installed
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 2.11.3
       libgit2: Not Installed
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: Not Installed
      pycrypto: Not Installed
  pycryptodome: 3.9.7
        pygit2: Not Installed
        Python: 3.9.7 (default, Sep 24 2021, 09:43:00)
  python-gnupg: Not Installed
        PyYAML: 5.3.1
         PyZMQ: 22.2.1
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.3.4
 
System Versions:
          dist: debian unstable sid
        locale: utf-8
       machine: x86_64
       release: 5.14.0-2-amd64
        system: Linux
       version: Debian GNU/Linux unstable sid

I even try a state.apply.

salt-ssh 192.168.0.101 state.apply openvpn
192.168.0.101:
----------
          ID: openvpn_pkgs
    Function: pkg.installed
      Result: True
     Comment: The following packages were installed/updated: openvpn
     Started: 15:55:26.027672
    Duration: 3306.577 ms
     Changes:   
              ----------
              liblzo2-2:
                  ----------
                  new:
                      2.10-2
                  old:
              libpkcs11-helper1:
                  ----------
                  new:
                      1.27-1
                  old:
              openvpn:
                  ----------
                  new:
                      2.5.1-3
                  old:
----------
          ID: openvpn_create_dh_512
    Function: cmd.run
        Name: "openssl" dhparam -out "/etc/openvpn/server/dh512.pem" 512
      Result: True
     Comment: Command ""openssl" dhparam -out "/etc/openvpn/server/dh512.pem" 512" run
     Started: 15:55:29.340243
    Duration: 1803.244 ms
     Changes:   
              ----------
              pid:
                  15730
              retcode:
                  0
              stderr:
                  Generating DH parameters, 512 bit long safe prime, generator 2
                  This is going to take a long time
                  .....................................+.......+............................+.........+................+........+................................+.......+..................................+.................................+...+...+..........................................................................+.......+..........+...................+..........................+.+..............+...................+....................................+....................+.....................................+..............+..............+..........+.....................+.....+.....................+.......................++*++*++*++*++*
              stdout:
----------
          ID: obsolete_openvpn_myserver1_service
    Function: service.dead
        Name: openvpn@myserver1
      Result: True
     Comment: The service openvpn@myserver1 is already dead
     Started: 15:55:31.143768
    Duration: 39.757 ms
     Changes:   
----------
          ID: openvpn_myserver1_service
    Function: service.running
        Name: openvpn-server@myserver1
      Result: False
     Comment: Job for [email protected] failed because the control process exited with error code.
              See "systemctl status [email protected]" and "journalctl -xe" for details.
     Started: 15:55:31.184283
    Duration: 69.761 ms
     Changes:   
----------
          ID: obsolete_openvpn_myclient1_service
    Function: service.dead
        Name: openvpn@myclient1
      Result: True
     Comment: The service openvpn@myclient1 is already dead
     Started: 15:55:31.254305
    Duration: 36.9 ms
     Changes:   
----------
          ID: openvpn_myclient1_service
    Function: service.running
        Name: openvpn-client@myclient1
      Result: False
     Comment: Job for [email protected] failed because the control process exited with error code.
              See "systemctl status [email protected]" and "journalctl -xe" for details.
     Started: 15:55:31.291657
    Duration: 69.458 ms
     Changes:   

Summary for 192.168.0.101
------------
Succeeded: 4 (changed=2)
Failed:    2
------------
Total states run:     6
Total run time:   5.326 s

I do not use the --extra-filerefs option

@waynegemmell
Copy link
Author

I've removed the extra-filerefs from my config and it's doing the same thing. Maybe it's a version issue? I'm trying to test on a lower version but not managing.

@baby-gnu
Copy link
Contributor

baby-gnu commented Oct 7, 2021

I'll setup a 3003.3 on a VM to test.

@waynegemmell
Copy link
Author

Any luck?

@baby-gnu
Copy link
Contributor

Hello @waynegemmell

On a VM with `3003.3`, it does not work with the following
$ salt-ssh 192.168.0.105 state.show_sls openvpn
192.168.0.104:
    - Rendering SLS 'base:openvpn.repo' failed: Jinja error: openvpn/map.jinja
      Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 500, in render_jinja_tmpl
          output = template.render(**decoded_context)
        File "/usr/lib/python3/dist-packages/jinja2/asyncsupport.py", line 76, in render
          return original_render(self, *args, **kwargs)
        File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1008, in render
          return self.environment.handle_exception(exc_info, True)
        File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 780, in handle_exception
          reraise(exc_type, exc_value, tb)
        File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise
          raise value.with_traceback(tb)
        File "<template>", line 1, in top-level template code
        File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
          raise TemplateNotFound(template)
      jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
      
      ; line 1
      
      ---
      {%- from "openvpn/map.jinja" import mapdata as map with context %}    <======================
      
      include:
        - openvpn.install
      
      {%- if map.external_repo_enabled == True and grains['os_family'] == "Debian" and grains['oscodename'] in map.external_repo_supported %}
      [...]
      ---
    - Rendering SLS 'base:openvpn.install' failed: Jinja error: openvpn/map.jinja
      Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 500, in render_jinja_tmpl
          output = template.render(**decoded_context)
        File "/usr/lib/python3/dist-packages/jinja2/asyncsupport.py", line 76, in render
          return original_render(self, *args, **kwargs)
        File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1008, in render
          return self.environment.handle_exception(exc_info, True)
        File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 780, in handle_exception
          reraise(exc_type, exc_value, tb)
        File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise
          raise value.with_traceback(tb)
        File "<template>", line 1, in top-level template code
        File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
          raise TemplateNotFound(template)
      jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
      
      ; line 1
      
      ---
      {%- from "openvpn/map.jinja" import mapdata as map with context %}    <======================
      
      # Install openvpn packages
      openvpn_pkgs:
      {%- if salt['pillar.get']('openvpn:use_latest', False) %}
        pkg.latest:
      [...]
      ---
    - Rendering SLS 'base:openvpn.dhparams' failed: Jinja error: openvpn/map.jinja
      Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 500, in render_jinja_tmpl
          output = template.render(**decoded_context)
        File "/usr/lib/python3/dist-packages/jinja2/asyncsupport.py", line 76, in render
          return original_render(self, *args, **kwargs)
        File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1008, in render
          return self.environment.handle_exception(exc_info, True)
        File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 780, in handle_exception
          reraise(exc_type, exc_value, tb)
        File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise
          raise value.with_traceback(tb)
        File "<template>", line 1, in top-level template code
        File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
          raise TemplateNotFound(template)
      jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
      
      ; line 1
      
      ---
      {%- from "openvpn/map.jinja" import mapdata as map with context %}    <======================
      
      # Generate diffie hellman files
      {% if salt['pillar.get']('openvpn:server', False) %}
        {#- Some distributions use /etc/openvpn/{client,server} as their working directory #}
        {%- set config_dir = map.get("server", {}).get("conf_dir", map.conf_dir) %}
      [...]
      ---
    - Rendering SLS 'base:openvpn.service' failed: Jinja error: openvpn/map.jinja
      Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 500, in render_jinja_tmpl
          output = template.render(**decoded_context)
        File "/usr/lib/python3/dist-packages/jinja2/asyncsupport.py", line 76, in render
          return original_render(self, *args, **kwargs)
        File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1008, in render
          return self.environment.handle_exception(exc_info, True)
        File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 780, in handle_exception
          reraise(exc_type, exc_value, tb)
        File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise
          raise value.with_traceback(tb)
        File "<template>", line 3, in top-level template code
        File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
          raise TemplateNotFound(template)
      jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
      
      ; line 3
      
      ---
      # Ensure openvpn service is running and autostart is enabled
      
      {%- from "openvpn/map.jinja" import mapdata as map with context %}    <======================
      
      
      {% if map.multi_services %}
      # If the OS is using systemd, then each openvpn config has its own service
      # e.g for office.conf -> openvpn@office
      [...]
On a VM with `3002.7`, it's working
$ salt-ssh --output yaml 192.168.0.105 state.show_sls openvpn
192.168.0.105:
- No matching sls found for 'openvpn' in env 'base'
root@buster:~# nano .salt/master 
root@buster:~# salt-ssh --output yaml 192.168.0.105 state.show_sls openvpn
192.168.0.105:
  obsolete_openvpn_myclient1_service:
    __env__: base
    __sls__: openvpn.service
    service:
    - name: openvpn@myclient1
    - enable: false
    - dead
    - order: 10004
  obsolete_openvpn_myserver1_service:
    __env__: base
    __sls__: openvpn.service
    service:
    - name: openvpn@myserver1
    - enable: false
    - dead
    - order: 10002
  openvpn_create_dh_512:
    __env__: base
    __sls__: openvpn.dhparams
    cmd:
    - name: '"openssl" dhparam -out "/etc/openvpn/server/dh512.pem" 512'
    - creates: /etc/openvpn/server/dh512.pem
    - require:
      - pkg: openvpn_pkgs
    - run
    - order: 10001
  openvpn_myclient1_service:
    __env__: base
    __sls__: openvpn.service
    service:
    - name: openvpn-client@myclient1
    - enable: true
    - require:
      - pkg: openvpn_pkgs
      - sls: openvpn.install
    - running
    - order: 10005
  openvpn_myserver1_service:
    __env__: base
    __sls__: openvpn.service
    service:
    - name: openvpn-server@myserver1
    - enable: true
    - require:
      - pkg: openvpn_pkgs
      - sls: openvpn.install
    - running
    - order: 10003
  openvpn_pkgs:
    __env__: base
    __sls__: openvpn.install
    pkg:
    - pkgs:
      - openvpn
    - installed
    - order: 10000

So, something changed between 3002.7 and 3003.3.

@waynegemmell
Copy link
Author

Any idea @myii ?

@myii
Copy link
Member

myii commented Oct 12, 2021

Any idea @myii ?

@waynegemmell Found this same regression hits the other formulas using the new map.jinja, including the openssh and TEMPLATE formulas. For example:

- Rendering SLS 'base:openssh.config' failed: Jinja error: openssh/map.jinja
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 500, in render_jinja_tmpl
      output = template.render(**decoded_context)
    File "/usr/lib/python3/dist-packages/jinja2/asyncsupport.py", line 76, in render
      return original_render(self, *args, **kwargs)
    File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1008, in render
      return self.environment.handle_exception(exc_info, True)
    File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 780, in handle_exception
      reraise(exc_type, exc_value, tb)
    File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise
      raise value.with_traceback(tb)
    File "<template>", line 2, in <module>
    File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
      raise TemplateNotFound(template)
  jinja2.exceptions.TemplateNotFound: openssh/map.jinja
  
  ; line 2
  
  ---
  {%- set tplroot = tpldir.split('/')[0] %}
  {%- from tplroot ~ "/map.jinja" import mapdata with context %}    <======================
  {%- from tplroot ~ "/libtofs.jinja" import files_switch %}
  {%- set openssh = mapdata.openssh %}
  {%- set sshd_config = mapdata.sshd_config %}
  {%- set ssh_config = mapdata.ssh_config %}
  
  [...]

And:

- Rendering SLS 'base:TEMPLATE.package.install' failed: Jinja error: TEMPLATE/map.jinja
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 500, in render_jinja_tmpl
      output = template.render(**decoded_context)
    File "/usr/lib/python3/dist-packages/jinja2/asyncsupport.py", line 76, in render
      return original_render(self, *args, **kwargs)
    File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1008, in render
      return self.environment.handle_exception(exc_info, True)
    File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 780, in handle_exception
      reraise(exc_type, exc_value, tb)
    File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise
      raise value.with_traceback(tb)
    File "<template>", line 6, in <module>
    File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
      raise TemplateNotFound(template)
  jinja2.exceptions.TemplateNotFound: TEMPLATE/map.jinja
  
  ; line 6
  
  ---
  # -*- coding: utf-8 -*-
  # vim: ft=sls
  
  {#- Get the `tplroot` from `tpldir` #}
  {%- set tplroot = tpldir.split('/')[0] %}
  {%- from tplroot ~ "/map.jinja" import mapdata as TEMPLATE with context %}    <======================
  
  TEMPLATE-package-install-pkg-installed:
    pkg.installed:
      - name: {{ TEMPLATE.pkg.name }}
  
  [...]

Following through from the issue the @baby-gnu has commented in above, it seems that a fix has just been merged that will be included in 3004:

I tried it out locally and it seems to work if I provide --extra-filerefs. The reason I can't be more specific is that each run takes an inordinately long time (much longer than when I've used salt-ssh in the fairly recent past). It also doesn't appear to work with state.show_sls.

@baby-gnu
Copy link
Contributor

Thanks @myii, so I really don't understand why it's working with 3002.7 without --extra-filerefs 😶

@waynegemmell
Copy link
Author

Thanks @myii, is that merged into master?

@myii
Copy link
Member

myii commented Oct 15, 2021

Thanks @myii, is that merged into master?

@waynegemmell Yes and as I understand, it will be included in 3004.

@baby-gnu
Copy link
Contributor

So, something changed between 3002.7 and 3003.3.

I did my tests again with several VMs trying to state.show_sls on a target machine and it shows that the problem starts from 3003 and it remains on 3004

salt-ssh 'testmachine*' cmd.run 'salt-ssh --versions-report; salt-ssh testmachine6 state.show_sls openvpn.repo'
testmachine0:
    Salt Version:
              Salt: 3002.7
     
    Dependency Versions:
              cffi: Not Installed
          cherrypy: Not Installed
          dateutil: 2.8.1
         docker-py: Not Installed
             gitdb: Not Installed
         gitpython: Not Installed
            Jinja2: 2.11.3
           libgit2: Not Installed
          M2Crypto: Not Installed
              Mako: Not Installed
           msgpack: 1.0.0
      msgpack-pure: Not Installed
      mysql-python: Not Installed
         pycparser: Not Installed
          pycrypto: Not Installed
      pycryptodome: 3.9.7
            pygit2: Not Installed
            Python: 3.9.2 (default, Feb 28 2021, 17:03:44)
      python-gnupg: Not Installed
            PyYAML: 5.3.1
             PyZMQ: 20.0.0
             smmap: Not Installed
           timelib: Not Installed
           Tornado: 4.5.3
               ZMQ: 4.3.4
     
    System Versions:
              dist: debian 11 bullseye
            locale: utf-8
           machine: x86_64
           release: 5.10.0-8-amd64
            system: Linux
           version: Debian GNU/Linux 11 bullseye
     
    testmachine6:
        ----------
        openvpn_pkgs:
            ----------
            __env__:
                base
            __sls__:
                openvpn.install
            pkg:
                |_
                  ----------
                  pkgs:
                      - openvpn
                - installed
                |_
                  ----------
                  order:
                      10000
testmachine1:
    Salt Version:
              Salt: 3003
     
    Dependency Versions:
              cffi: Not Installed
          cherrypy: Not Installed
          dateutil: 2.8.1
         docker-py: Not Installed
             gitdb: Not Installed
         gitpython: Not Installed
            Jinja2: 2.11.3
           libgit2: Not Installed
          M2Crypto: Not Installed
              Mako: Not Installed
           msgpack: 1.0.0
      msgpack-pure: Not Installed
      mysql-python: Not Installed
         pycparser: Not Installed
          pycrypto: Not Installed
      pycryptodome: 3.9.7
            pygit2: Not Installed
            Python: 3.9.2 (default, Feb 28 2021, 17:03:44)
      python-gnupg: Not Installed
            PyYAML: 5.3.1
             PyZMQ: 20.0.0
             smmap: Not Installed
           timelib: Not Installed
           Tornado: 4.5.3
               ZMQ: 4.3.4
     
    System Versions:
              dist: debian 11 bullseye
            locale: utf-8
           machine: x86_64
           release: 5.10.0-8-amd64
            system: Linux
           version: Debian GNU/Linux 11 bullseye
     
    [ERROR   ] Rendering exception occurred
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 497, in render_jinja_tmpl
        output = template.render(**decoded_context)
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
        self.environment.handle_exception()
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
        reraise(*rewrite_traceback_stack(source=source))
      File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
        raise value.with_traceback(tb)
      File "<template>", line 1, in top-level template code
      File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
        raise TemplateNotFound(template)
    jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 261, in render_tmpl
        output = render_str(tmplstr, context, tmplpath)
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 542, in render_jinja_tmpl
        raise SaltRenderError(
    salt.exceptions.SaltRenderError: Jinja error: openvpn/map.jinja
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 497, in render_jinja_tmpl
        output = template.render(**decoded_context)
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
        self.environment.handle_exception()
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
        reraise(*rewrite_traceback_stack(source=source))
      File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
        raise value.with_traceback(tb)
      File "<template>", line 1, in top-level template code
      File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
        raise TemplateNotFound(template)
    jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
    
    ; line 1
    
    ---
    {%- from "openvpn/map.jinja" import mapdata as map with context %}    <======================
    
    include:
      - openvpn.install
    
    {%- if map.external_repo_enabled == True and grains['os_family'] == "Debian" and grains['oscodename'] in map.external_repo_supported %}
    [...]
    ---
    [CRITICAL] Rendering SLS 'base:openvpn.repo' failed: Jinja error: openvpn/map.jinja
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 497, in render_jinja_tmpl
        output = template.render(**decoded_context)
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
        self.environment.handle_exception()
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
        reraise(*rewrite_traceback_stack(source=source))
      File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
        raise value.with_traceback(tb)
      File "<template>", line 1, in top-level template code
      File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
        raise TemplateNotFound(template)
    jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
    
    ; line 1
    
    ---
    {%- from "openvpn/map.jinja" import mapdata as map with context %}    <======================
    
    include:
      - openvpn.install
    
    {%- if map.external_repo_enabled == True and grains['os_family'] == "Debian" and grains['oscodename'] in map.external_repo_supported %}
    [...]
    ---
    testmachine6:
        - Rendering SLS 'base:openvpn.repo' failed: Jinja error: openvpn/map.jinja
          Traceback (most recent call last):
            File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 497, in render_jinja_tmpl
              output = template.render(**decoded_context)
            File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
              self.environment.handle_exception()
            File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
              reraise(*rewrite_traceback_stack(source=source))
            File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
              raise value.with_traceback(tb)
            File "<template>", line 1, in top-level template code
            File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
              raise TemplateNotFound(template)
          jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
          
          ; line 1
          
          ---
          {%- from "openvpn/map.jinja" import mapdata as map with context %}    <======================
          
          include:
            - openvpn.install
          
          {%- if map.external_repo_enabled == True and grains['os_family'] == "Debian" and grains['oscodename'] in map.external_repo_supported %}
          [...]
          ---
testmachine2:
    Salt Version:
              Salt: 3003.1
     
    Dependency Versions:
              cffi: Not Installed
          cherrypy: Not Installed
          dateutil: 2.8.1
         docker-py: Not Installed
             gitdb: Not Installed
         gitpython: Not Installed
            Jinja2: 2.11.3
           libgit2: Not Installed
          M2Crypto: Not Installed
              Mako: Not Installed
           msgpack: 1.0.0
      msgpack-pure: Not Installed
      mysql-python: Not Installed
         pycparser: Not Installed
          pycrypto: Not Installed
      pycryptodome: 3.9.7
            pygit2: Not Installed
            Python: 3.9.2 (default, Feb 28 2021, 17:03:44)
      python-gnupg: Not Installed
            PyYAML: 5.3.1
             PyZMQ: 20.0.0
             smmap: Not Installed
           timelib: Not Installed
           Tornado: 4.5.3
               ZMQ: 4.3.4
     
    System Versions:
              dist: debian 11 bullseye
            locale: utf-8
           machine: x86_64
           release: 5.10.0-8-amd64
            system: Linux
           version: Debian GNU/Linux 11 bullseye
     
    [ERROR   ] Rendering exception occurred
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 500, in render_jinja_tmpl
        output = template.render(**decoded_context)
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
        self.environment.handle_exception()
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
        reraise(*rewrite_traceback_stack(source=source))
      File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
        raise value.with_traceback(tb)
      File "<template>", line 1, in top-level template code
      File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
        raise TemplateNotFound(template)
    jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 262, in render_tmpl
        output = render_str(tmplstr, context, tmplpath)
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 545, in render_jinja_tmpl
        raise SaltRenderError(
    salt.exceptions.SaltRenderError: Jinja error: openvpn/map.jinja
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 500, in render_jinja_tmpl
        output = template.render(**decoded_context)
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
        self.environment.handle_exception()
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
        reraise(*rewrite_traceback_stack(source=source))
      File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
        raise value.with_traceback(tb)
      File "<template>", line 1, in top-level template code
      File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
        raise TemplateNotFound(template)
    jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
    
    ; line 1
    
    ---
    {%- from "openvpn/map.jinja" import mapdata as map with context %}    <======================
    
    include:
      - openvpn.install
    
    {%- if map.external_repo_enabled == True and grains['os_family'] == "Debian" and grains['oscodename'] in map.external_repo_supported %}
    [...]
    ---
    [CRITICAL] Rendering SLS 'base:openvpn.repo' failed: Jinja error: openvpn/map.jinja
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 500, in render_jinja_tmpl
        output = template.render(**decoded_context)
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
        self.environment.handle_exception()
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
        reraise(*rewrite_traceback_stack(source=source))
      File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
        raise value.with_traceback(tb)
      File "<template>", line 1, in top-level template code
      File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
        raise TemplateNotFound(template)
    jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
    
    ; line 1
    
    ---
    {%- from "openvpn/map.jinja" import mapdata as map with context %}    <======================
    
    include:
      - openvpn.install
    
    {%- if map.external_repo_enabled == True and grains['os_family'] == "Debian" and grains['oscodename'] in map.external_repo_supported %}
    [...]
    ---
    testmachine6:
        - Rendering SLS 'base:openvpn.repo' failed: Jinja error: openvpn/map.jinja
          Traceback (most recent call last):
            File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 500, in render_jinja_tmpl
              output = template.render(**decoded_context)
            File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
              self.environment.handle_exception()
            File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
              reraise(*rewrite_traceback_stack(source=source))
            File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
              raise value.with_traceback(tb)
            File "<template>", line 1, in top-level template code
            File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
              raise TemplateNotFound(template)
          jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
          
          ; line 1
          
          ---
          {%- from "openvpn/map.jinja" import mapdata as map with context %}    <======================
          
          include:
            - openvpn.install
          
          {%- if map.external_repo_enabled == True and grains['os_family'] == "Debian" and grains['oscodename'] in map.external_repo_supported %}
          [...]
          ---
testmachine3:
    Salt Version:
              Salt: 3003.2
     
    Dependency Versions:
              cffi: Not Installed
          cherrypy: Not Installed
          dateutil: 2.8.1
         docker-py: Not Installed
             gitdb: Not Installed
         gitpython: Not Installed
            Jinja2: 2.11.3
           libgit2: Not Installed
          M2Crypto: Not Installed
              Mako: Not Installed
           msgpack: 1.0.0
      msgpack-pure: Not Installed
      mysql-python: Not Installed
         pycparser: Not Installed
          pycrypto: Not Installed
      pycryptodome: 3.9.7
            pygit2: Not Installed
            Python: 3.9.2 (default, Feb 28 2021, 17:03:44)
      python-gnupg: Not Installed
            PyYAML: 5.3.1
             PyZMQ: 20.0.0
             smmap: Not Installed
           timelib: Not Installed
           Tornado: 4.5.3
               ZMQ: 4.3.4
     
    System Versions:
              dist: debian 11 bullseye
            locale: utf-8
           machine: x86_64
           release: 5.10.0-8-amd64
            system: Linux
           version: Debian GNU/Linux 11 bullseye
     
    [ERROR   ] Rendering exception occurred
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 500, in render_jinja_tmpl
        output = template.render(**decoded_context)
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
        self.environment.handle_exception()
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
        reraise(*rewrite_traceback_stack(source=source))
      File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
        raise value.with_traceback(tb)
      File "<template>", line 1, in top-level template code
      File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
        raise TemplateNotFound(template)
    jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 262, in render_tmpl
        output = render_str(tmplstr, context, tmplpath)
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 545, in render_jinja_tmpl
        raise SaltRenderError(
    salt.exceptions.SaltRenderError: Jinja error: openvpn/map.jinja
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 500, in render_jinja_tmpl
        output = template.render(**decoded_context)
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
        self.environment.handle_exception()
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
        reraise(*rewrite_traceback_stack(source=source))
      File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
        raise value.with_traceback(tb)
      File "<template>", line 1, in top-level template code
      File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
        raise TemplateNotFound(template)
    jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
    
    ; line 1
    
    ---
    {%- from "openvpn/map.jinja" import mapdata as map with context %}    <======================
    
    include:
      - openvpn.install
    
    {%- if map.external_repo_enabled == True and grains['os_family'] == "Debian" and grains['oscodename'] in map.external_repo_supported %}
    [...]
    ---
    [CRITICAL] Rendering SLS 'base:openvpn.repo' failed: Jinja error: openvpn/map.jinja
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 500, in render_jinja_tmpl
        output = template.render(**decoded_context)
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
        self.environment.handle_exception()
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
        reraise(*rewrite_traceback_stack(source=source))
      File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
        raise value.with_traceback(tb)
      File "<template>", line 1, in top-level template code
      File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
        raise TemplateNotFound(template)
    jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
    
    ; line 1
    
    ---
    {%- from "openvpn/map.jinja" import mapdata as map with context %}    <======================
    
    include:
      - openvpn.install
    
    {%- if map.external_repo_enabled == True and grains['os_family'] == "Debian" and grains['oscodename'] in map.external_repo_supported %}
    [...]
    ---
    testmachine6:
        - Rendering SLS 'base:openvpn.repo' failed: Jinja error: openvpn/map.jinja
          Traceback (most recent call last):
            File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 500, in render_jinja_tmpl
              output = template.render(**decoded_context)
            File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
              self.environment.handle_exception()
            File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
              reraise(*rewrite_traceback_stack(source=source))
            File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
              raise value.with_traceback(tb)
            File "<template>", line 1, in top-level template code
            File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
              raise TemplateNotFound(template)
          jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
          
          ; line 1
          
          ---
          {%- from "openvpn/map.jinja" import mapdata as map with context %}    <======================
          
          include:
            - openvpn.install
          
          {%- if map.external_repo_enabled == True and grains['os_family'] == "Debian" and grains['oscodename'] in map.external_repo_supported %}
          [...]
          ---
testmachine4:
    Salt Version:
              Salt: 3003.3
     
    Dependency Versions:
              cffi: Not Installed
          cherrypy: Not Installed
          dateutil: 2.8.1
         docker-py: Not Installed
             gitdb: Not Installed
         gitpython: Not Installed
            Jinja2: 2.11.3
           libgit2: Not Installed
          M2Crypto: Not Installed
              Mako: Not Installed
           msgpack: 1.0.0
      msgpack-pure: Not Installed
      mysql-python: Not Installed
         pycparser: Not Installed
          pycrypto: Not Installed
      pycryptodome: 3.9.7
            pygit2: Not Installed
            Python: 3.9.2 (default, Feb 28 2021, 17:03:44)
      python-gnupg: Not Installed
            PyYAML: 5.3.1
             PyZMQ: 20.0.0
             smmap: Not Installed
           timelib: Not Installed
           Tornado: 4.5.3
               ZMQ: 4.3.4
     
    System Versions:
              dist: debian 11 bullseye
            locale: utf-8
           machine: x86_64
           release: 5.10.0-8-amd64
            system: Linux
           version: Debian GNU/Linux 11 bullseye
     
    [ERROR   ] Rendering exception occurred
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 500, in render_jinja_tmpl
        output = template.render(**decoded_context)
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
        self.environment.handle_exception()
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
        reraise(*rewrite_traceback_stack(source=source))
      File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
        raise value.with_traceback(tb)
      File "<template>", line 1, in top-level template code
      File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
        raise TemplateNotFound(template)
    jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 262, in render_tmpl
        output = render_str(tmplstr, context, tmplpath)
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 545, in render_jinja_tmpl
        raise SaltRenderError(
    salt.exceptions.SaltRenderError: Jinja error: openvpn/map.jinja
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 500, in render_jinja_tmpl
        output = template.render(**decoded_context)
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
        self.environment.handle_exception()
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
        reraise(*rewrite_traceback_stack(source=source))
      File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
        raise value.with_traceback(tb)
      File "<template>", line 1, in top-level template code
      File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
        raise TemplateNotFound(template)
    jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
    
    ; line 1
    
    ---
    {%- from "openvpn/map.jinja" import mapdata as map with context %}    <======================
    
    include:
      - openvpn.install
    
    {%- if map.external_repo_enabled == True and grains['os_family'] == "Debian" and grains['oscodename'] in map.external_repo_supported %}
    [...]
    ---
    [CRITICAL] Rendering SLS 'base:openvpn.repo' failed: Jinja error: openvpn/map.jinja
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 500, in render_jinja_tmpl
        output = template.render(**decoded_context)
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
        self.environment.handle_exception()
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
        reraise(*rewrite_traceback_stack(source=source))
      File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
        raise value.with_traceback(tb)
      File "<template>", line 1, in top-level template code
      File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
        raise TemplateNotFound(template)
    jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
    
    ; line 1
    
    ---
    {%- from "openvpn/map.jinja" import mapdata as map with context %}    <======================
    
    include:
      - openvpn.install
    
    {%- if map.external_repo_enabled == True and grains['os_family'] == "Debian" and grains['oscodename'] in map.external_repo_supported %}
    [...]
    ---
    testmachine6:
        - Rendering SLS 'base:openvpn.repo' failed: Jinja error: openvpn/map.jinja
          Traceback (most recent call last):
            File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 500, in render_jinja_tmpl
              output = template.render(**decoded_context)
            File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
              self.environment.handle_exception()
            File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
              reraise(*rewrite_traceback_stack(source=source))
            File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
              raise value.with_traceback(tb)
            File "<template>", line 1, in top-level template code
            File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
              raise TemplateNotFound(template)
          jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
          
          ; line 1
          
          ---
          {%- from "openvpn/map.jinja" import mapdata as map with context %}    <======================
          
          include:
            - openvpn.install
          
          {%- if map.external_repo_enabled == True and grains['os_family'] == "Debian" and grains['oscodename'] in map.external_repo_supported %}
          [...]
          ---
testmachine5:
    Salt Version:
              Salt: 3004
     
    Dependency Versions:
              cffi: Not Installed
          cherrypy: Not Installed
          dateutil: 2.8.1
         docker-py: Not Installed
             gitdb: Not Installed
         gitpython: Not Installed
            Jinja2: 2.11.3
           libgit2: Not Installed
          M2Crypto: Not Installed
              Mako: Not Installed
           msgpack: 1.0.0
      msgpack-pure: Not Installed
      mysql-python: Not Installed
         pycparser: Not Installed
          pycrypto: Not Installed
      pycryptodome: 3.9.7
            pygit2: Not Installed
            Python: 3.9.2 (default, Feb 28 2021, 17:03:44)
      python-gnupg: Not Installed
            PyYAML: 5.3.1
             PyZMQ: 20.0.0
             smmap: Not Installed
           timelib: Not Installed
           Tornado: 4.5.3
               ZMQ: 4.3.4
     
    System Versions:
              dist: debian 11 bullseye
            locale: utf-8
           machine: x86_64
           release: 5.10.0-8-amd64
            system: Linux
           version: Debian GNU/Linux 11 bullseye
     
    [ERROR   ] Rendering exception occurred
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 502, in render_jinja_tmpl
        output = template.render(**decoded_context)
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
        self.environment.handle_exception()
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
        reraise(*rewrite_traceback_stack(source=source))
      File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
        raise value.with_traceback(tb)
      File "<template>", line 1, in top-level template code
      File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
        raise TemplateNotFound(template)
    jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 261, in render_tmpl
        output = render_str(tmplstr, context, tmplpath)
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 547, in render_jinja_tmpl
        raise SaltRenderError(
    salt.exceptions.SaltRenderError: Jinja error: openvpn/map.jinja
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 502, in render_jinja_tmpl
        output = template.render(**decoded_context)
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
        self.environment.handle_exception()
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
        reraise(*rewrite_traceback_stack(source=source))
      File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
        raise value.with_traceback(tb)
      File "<template>", line 1, in top-level template code
      File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
        raise TemplateNotFound(template)
    jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
    
    ; line 1
    
    ---
    {%- from "openvpn/map.jinja" import mapdata as map with context %}    <======================
    
    include:
      - openvpn.install
    
    {%- if map.external_repo_enabled == True and grains['os_family'] == "Debian" and grains['oscodename'] in map.external_repo_supported %}
    [...]
    ---
    [CRITICAL] Rendering SLS 'base:openvpn.repo' failed: Jinja error: openvpn/map.jinja
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 502, in render_jinja_tmpl
        output = template.render(**decoded_context)
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
        self.environment.handle_exception()
      File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
        reraise(*rewrite_traceback_stack(source=source))
      File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
        raise value.with_traceback(tb)
      File "<template>", line 1, in top-level template code
      File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
        raise TemplateNotFound(template)
    jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
    
    ; line 1
    
    ---
    {%- from "openvpn/map.jinja" import mapdata as map with context %}    <======================
    
    include:
      - openvpn.install
    
    {%- if map.external_repo_enabled == True and grains['os_family'] == "Debian" and grains['oscodename'] in map.external_repo_supported %}
    [...]
    ---
    testmachine6:
        - Rendering SLS 'base:openvpn.repo' failed: Jinja error: openvpn/map.jinja
          Traceback (most recent call last):
            File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 502, in render_jinja_tmpl
              output = template.render(**decoded_context)
            File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1090, in render
              self.environment.handle_exception()
            File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 832, in handle_exception
              reraise(*rewrite_traceback_stack(source=source))
            File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 28, in reraise
              raise value.with_traceback(tb)
            File "<template>", line 1, in top-level template code
            File "/usr/lib/python3/dist-packages/salt/utils/jinja.py", line 198, in get_source
              raise TemplateNotFound(template)
          jinja2.exceptions.TemplateNotFound: openvpn/map.jinja
          
          ; line 1
          
          ---
          {%- from "openvpn/map.jinja" import mapdata as map with context %}    <======================
          
          include:
            - openvpn.install
          
          {%- if map.external_repo_enabled == True and grains['os_family'] == "Debian" and grains['oscodename'] in map.external_repo_supported %}
          [...]
          ---

@baby-gnu
Copy link
Contributor

I produce a minimalist setup to reproduce the problem in saltstack/salt#31531 (comment).

@baby-gnu
Copy link
Contributor

baby-gnu commented Apr 8, 2022

Hello, saltstack/salt#61895 fixes my issues with either rootfs and gitfs without the any use of --extra-filerefs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants