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

Stack Trace Errors during attempt to load modules #39566

Closed
Ch3LL opened this issue Feb 22, 2017 · 2 comments
Closed

Stack Trace Errors during attempt to load modules #39566

Ch3LL opened this issue Feb 22, 2017 · 2 comments
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt Loader P4 Priority 4 severity-low 4th level, cosemtic problems, work around exists stale
Milestone

Comments

@Ch3LL
Copy link
Contributor

Ch3LL commented Feb 22, 2017

Description of Issue/Question

If I only have python-boto3 installed and NOT python-boto installed, When trying to run this state:

Ensure mylc exists:
  boto_lc.present:
    - name: mylc
    - image_id: ami-0b9c9f62
    - key_name: mykey
    - security_groups:
        - mygroup
    - instance_type: m1.small
    - instance_monitoring: true
    - block_device_mappings:
        - '/dev/sda1':
            size: 20
            volume_type: 'io1'
            iops: 220
            delete_on_termination: true
    - cloud_init:
        boothooks:
          'disable-master.sh': |
            #!/bin/bash
            echo "manual" > /etc/init/salt-master.override
        scripts:
          'run_salt.sh': |
            #!/bin/bash

            add-apt-repository -y ppa:saltstack/salt
            apt-get update
            apt-get install -y salt-minion
            salt-call state.highstate
    - region: us-east-1
    - keyid: GKTADJGHEIQSXMKKRBJ08H
    - key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs

salt-call --local state.apply test -ldebug I get the following import errors:

[DEBUG   ] Failed to import utils psutil_compat:
Traceback (most recent call last):
  File "/testing/salt/loader.py", line 1332, in _load_module
    mod = imp.load_module(mod_namespace, fn_, fpath, desc)
  File "/testing/salt/utils/psutil_compat.py", line 20, in <module>
    import psutil
ImportError: No module named psutil
[DEBUG   ] Failed to import utils mako:
Traceback (most recent call last):
  File "/testing/salt/loader.py", line 1332, in _load_module
    mod = imp.load_module(mod_namespace, fn_, fpath, desc)
  File "/testing/salt/utils/mako.py", line 12, in <module>
    from mako.lookup import TemplateCollection, TemplateLookup  # pylint: disable=import-error
  File "/testing/salt/utils/mako.py", line 12, in <module>
    from mako.lookup import TemplateCollection, TemplateLookup  # pylint: disable=import-error
ImportError: No module named lookup
[DEBUG   ] Failed to import utils raetlane:
Traceback (most recent call last):
  File "/testing/salt/loader.py", line 1332, in _load_module
    mod = imp.load_module(mod_namespace, fn_, fpath, desc)
  File "/testing/salt/utils/raetlane.py", line 62, in <module>
    from raet import raeting, nacling
ImportError: No module named raet
[DEBUG   ] Failed to import utils raetevent:
Traceback (most recent call last):
  File "/testing/salt/loader.py", line 1332, in _load_module
    mod = imp.load_module(mod_namespace, fn_, fpath, desc)
  File "/testing/salt/utils/raetevent.py", line 23, in <module>
    from raet import raeting, nacling
ImportError: No module named raet
[ERROR   ] Failed to import utils saltminionservice, this is due most likely to a syntax error:
Traceback (most recent call last):
  File "/testing/salt/loader.py", line 1332, in _load_module
    mod = imp.load_module(mod_namespace, fn_, fpath, desc)
  File "/testing/salt/utils/saltminionservice.py", line 34, in <module>
    class MinionService(service(False)):
TypeError: Error when calling the metaclass bases
    cannot create 'NoneType' instances

if I install python-boto then I do not see these errors.

NOTE: both python-boto and python-boto3 are required for this module so this is a unique side case

Setup

  1. install python-boto3
  2. Add the state above to file_roots

Steps to Reproduce Issue

  1. salt-call --local state.apply test -ldebug

Versions Report

Salt Version:
           Salt: 2016.11.3
 
Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 1.5
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.8
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
         pygit2: Not Installed
         Python: 2.7.5 (default, Jun 17 2014, 18:11:42)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.3.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.1.4
 
System Versions:
           dist: centos 7.0.1406 Core
        machine: x86_64
        release: 3.10.0-123.6.3.el7.x86_64
         system: Linux
        version: CentOS Linux 7.0.1406 Core

Will be including a docker container here in a sec.

@Ch3LL
Copy link
Contributor Author

Ch3LL commented Feb 22, 2017

Here is a docker container to help replicate the issue:

  1. docker run -it -v /home/ch3ll/git/salt/:/testing ch3ll/issues:39566 ( where /home/ch3ll/git/salt/ is a local cloned git repo of salt)
  2. salt-call --local state.sls test -ldebug

@Ch3LL Ch3LL added Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt Loader severity-low 4th level, cosemtic problems, work around exists P4 Priority 4 labels Feb 22, 2017
@Ch3LL Ch3LL added this to the Approved milestone Feb 22, 2017
@stale
Copy link

stale bot commented Sep 8, 2018

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 Sep 8, 2018
@stale stale bot closed this as completed Sep 15, 2018
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 Core relates to code central or existential to Salt Loader P4 Priority 4 severity-low 4th level, cosemtic problems, work around exists stale
Projects
None yet
Development

No branches or pull requests

1 participant