Skip to content

saltutil.sync_utils does not work for the salt.utils.templates module? #51719

@arizvisa

Description

@arizvisa

Description of Issue/Question

I wrote a PR (#51718) to fix the support of the Cheetah engine in salt.utils.templates, and I'm trying to synchronize my fix to each minion via saltutil.sync_all or saltutil.sync_utils (until you guys merge it or whatever). However, for some reason salt-minion is still picking up the path via salt.utils.templates (in site-packages/salt) instead of honoring the module in the extmods cache. Is this unsupported for certain modules, or is it just a version issue on my end?

Setup

Write templates.py to _utils under your salt base environment so that when you call saltutil.sync_utils, it'll cache it under extmods. Just to be sure, you can rm the salt/utils/templates.py file from your site-packages on the target minion. This should normally be okay because salt-minion should pick up the templates.py module that is cached in extmods.

Steps to Reproduce Issue

Run salt $target saltutil.sync_utils to confirm the templates.py module gets synchronized. However, note that salt-minion will still use the old salt.utils.templates module, or complain that it is unable to locate the module via an ImportError.

Versions Report

Salt Version:
           Salt: 2018.3.3

Dependency Versions:
           cffi: 1.10.0
       cherrypy: 10.2.1
       dateutil: 2.6.1
      docker-py: Not Installed
          gitdb: 2.0.5
      gitpython: 2.1.3
          ioflo: Not Installed
         Jinja2: 2.10
        libgit2: Not Installed
        libnacl: 1.6.1
       M2Crypto: Not Installed
           Mako: 1.0.7
   msgpack-pure: Not Installed
 msgpack-python: 0.4.8
   mysql-python: Not Installed
      pycparser: 2.17
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)]
   python-gnupg: 0.4.1
         PyYAML: 3.12
          PyZMQ: 16.0.3
           RAET: Not Installed
          smmap: 2.0.5
        timelib: 0.2.4
        Tornado: 4.5.1
            ZMQ: 4.1.6

System Versions:
           dist:
         locale: cp1252
        machine: AMD64
        release: 8
         system: Windows
        version: 8 6.2.9200 SP0 Multiprocessor Free

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionThe issue is more of a question rather than a bug or a feature request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions