Salt: [master] Traceback in esxi grain module on import

Created on 5 Feb 2020  路  4Comments  路  Source: saltstack/salt

Description of Issue

Pretty self-explanatory, this happens against the current head of the master branch (81eb15264380d82267ffc3c1930410baf1f3fbf1).

Steps to Reproduce Issue

On a docker container, I installed the testing modules using pip install -r requirements/static/py2.7/linux.txt, which results in the following traceback on _every_ salt-call:

% docker run --rm -it -v $PWD:/testing terminalmage/issues:56061 salt-call test.ping
[ERROR   ] Failed to import grains esxi, this is due most likely to a syntax error:
Traceback (most recent call last):
  File "/testing/salt/loader.py", line 1607, in _load_module
    mod = imp.load_module(mod_namespace, fn_, fpath, desc)
  File "/testing/salt/grains/esxi.py", line 16, in <module>
    import salt.modules.vsphere
  File "/testing/salt/modules/vsphere.py", line 222, in <module>
    import jsonschema
  File "/usr/lib/python2.7/site-packages/jsonschema/__init__.py", line 18, in <module>
    from jsonschema.validators import (
  File "/usr/lib/python2.7/site-packages/jsonschema/validators.py", line 170, in <module>
    meta_schema=_utils.load_schema("draft3"),
  File "/usr/lib/python2.7/site-packages/jsonschema/_utils.py", line 57, in load_schema
    data = pkgutil.get_data('jsonschema', "schemas/{0}.json".format(name))
  File "/usr/lib64/python2.7/pkgutil.py", line 578, in get_data
    loader = get_loader(package)
  File "/usr/lib64/python2.7/pkgutil.py", line 464, in get_loader
    return find_loader(fullname)
  File "/usr/lib64/python2.7/pkgutil.py", line 475, in find_loader
    loader = importer.find_module(fullname)
TypeError: find_module() takes exactly 3 arguments (2 given)
local:
    True

Versions Report

Salt Version:
           Salt: 3000

Dependency Versions:
           cffi: 1.12.2
       cherrypy: 17.3.0
       dateutil: 2.8.0
      docker-py: 3.7.2
          gitdb: 2.0.5
      gitpython: 2.1.11
         Jinja2: 2.10.1
        libgit2: 0.28.2
       M2Crypto: Not Installed
           Mako: 1.1.0
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: Not Installed
      pycparser: 2.19
       pycrypto: 3.8.1
   pycryptodome: Not Installed
         pygit2: 0.28.2
         Python: 2.7.5 (default, Jun 20 2019, 20:27:34)
   python-gnupg: 0.4.4
         PyYAML: 5.1.2
          PyZMQ: 18.0.1
          smmap: 2.0.5
        timelib: 0.2.4
        Tornado: 4.5.3
            ZMQ: 4.3.1

System Versions:
           dist: centos 7.6.1810 Core
         locale: UTF-8
        machine: x86_64
        release: 5.4.15-arch1-1
         system: Linux
        version: CentOS Linux 7.6.1810 Core
Bug P1 v3000.1

Most helpful comment

Assigning to have test written for the PR https://github.com/saltstack/salt/pull/56094

All 4 comments

@terminalmage Thank you for reporting this issue.

I see the same thing when installing the requirements/static/py2.7/linux.txt.

Thanks

Assigning to have test written for the PR https://github.com/saltstack/salt/pull/56094

Is there a workaround for this in the mean time?

im not aware of a workaround based on looking at the change, unless @terminalmage or @dwoz are aware of one.

Since this is fixed in https://github.com/saltstack/salt/pull/56094 and will be in 3000.1 going to close for now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sagetherage picture sagetherage  路  3Comments

sfozz picture sfozz  路  3Comments

qiushics picture qiushics  路  3Comments

twangboy picture twangboy  路  3Comments

lhost picture lhost  路  3Comments