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

[master] Traceback in esxi grain module on import #56063

Closed
terminalmage opened this issue Feb 4, 2020 · 4 comments
Closed

[master] Traceback in esxi grain module on import #56063

terminalmage opened this issue Feb 4, 2020 · 4 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior P1 Priority 1 v3000.1 vulnerable version
Milestone

Comments

@terminalmage
Copy link
Contributor

Description of Issue

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

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
@frogunder
Copy link
Contributor

@terminalmage Thank you for reporting this issue.

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

Thanks

@frogunder frogunder added this to the Approved milestone Feb 5, 2020
@frogunder frogunder added the Bug broken, incorrect, or confusing behavior label Feb 5, 2020
@sagetherage sagetherage added P1 Priority 1 ZRelease-Sodium retired label labels Feb 5, 2020
@sagetherage sagetherage added v3000.1 vulnerable version and removed ZRelease-Sodium retired label labels Feb 20, 2020
@sagetherage
Copy link
Contributor

Assigning to have test written for the PR #56094

@edeefelt
Copy link

edeefelt commented Mar 4, 2020

Is there a workaround for this in the mean time?

@Ch3LL
Copy link
Contributor

Ch3LL commented Mar 13, 2020

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 #56094 and will be in 3000.1 going to close for now.

@Ch3LL Ch3LL closed this as completed Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior P1 Priority 1 v3000.1 vulnerable version
Projects
None yet
Development

No branches or pull requests

6 participants