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

runner cannot import modules after upgrading to 2018.3.1 #48221

Closed
angeloudy opened this issue Jun 20, 2018 · 2 comments
Closed

runner cannot import modules after upgrading to 2018.3.1 #48221

angeloudy opened this issue Jun 20, 2018 · 2 comments
Labels
Duplicate Duplicate of another issue or PR - will be closed info-needed waiting for more info stale
Milestone

Comments

@angeloudy
Copy link
Contributor

I have some custom runners located at /usr/local/etc/salt/runner.
And I also have a lib folder /usr/local/etc/salt/runner/lib
Some of my runners need to import modules from this lib folder and they all have lines like from lib import something

This has stopped working since I upgraded salt to 2018.3.1
The error I got is __virtual__ returned False: No module named 'lib'

However, if I deleted __pycache__ directory from /usr/local/etc/salt/runner, my runners can successfully run and will stop to run for a second time because the __pycache__ was recreated and I have to remove __pycache__ again to get the runners to run.

Is this related to some environment configuration or something wrong with salt loader?

Versions Report

(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)

Salt Version:
           Salt: 2018.3.1

Dependency Versions:
           cffi: 1.11.5
       cherrypy: unknown
       dateutil: 2.7.2
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.10
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: 1.3.12
      pycparser: 2.18
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 3.6.5 (default, Apr  5 2018, 13:37:49)
   python-gnupg: Not Installed
         PyYAML: 3.12
          PyZMQ: 17.0.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.2.3

System Versions:
           dist:
         locale: UTF-8
        machine: amd64
        release: 11.1-RELEASE-p9
         system: FreeBSD
        version: Not Installed

@Ch3LL
Copy link
Contributor

Ch3LL commented Jun 20, 2018

duplicate of #46924 In that issue the bisect shows changes to a loader that causes this.

Before I close as a duplicate can you clarify one thing for me:

"However, if I deleted pycache directory from /usr/local/etc/salt/runner, my runners can successfully run and will stop to run for a second time because the pycache was recreated and I have to remove pycache again to get the runners to run." Does this mean you can only use your runner once and then they become unusable again until you clear the cache again?

@Ch3LL Ch3LL added Duplicate Duplicate of another issue or PR - will be closed info-needed waiting for more info labels Jun 20, 2018
@Ch3LL Ch3LL added this to the Blocked milestone Jun 20, 2018
@stale
Copy link

stale bot commented Oct 3, 2019

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.

@stale stale bot added the stale label Oct 3, 2019
@stale stale bot closed this as completed Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate Duplicate of another issue or PR - will be closed info-needed waiting for more info stale
Projects
None yet
Development

No branches or pull requests

2 participants