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

variable referenced before assignment #34379

Closed
UtahDave opened this issue Jun 29, 2016 · 0 comments
Closed

variable referenced before assignment #34379

UtahDave opened this issue Jun 29, 2016 · 0 comments
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt P2 Priority 2 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@UtahDave
Copy link
Contributor

Description of Issue/Question

I ran a highstate with test=True and got the following stacktrace:

server03:
    The minion function caused an exception: Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/salt/minion.py", line 1318, in _thread_return
        return_data = executor.execute()
      File "/usr/lib/python2.7/site-packages/salt/executors/direct_call.py", line 28, in execute
        return self.func(*self.args, **self.kwargs)
      File "/usr/lib/python2.7/site-packages/salt/modules/state.py", line 722, in highstate
        whitelist=kwargs.get('whitelist')
      File "/usr/lib/python2.7/site-packages/salt/state.py", line 3216, in call_highstate
        self.load_dynamic(matches)
      File "/usr/lib/python2.7/site-packages/salt/state.py", line 2745, in load_dynamic
        refresh=False)
      File "/usr/lib/python2.7/site-packages/salt/modules/saltutil.py", line 562, in sync_all
        ret['states'] = sync_states(saltenv, False)
      File "/usr/lib/python2.7/site-packages/salt/modules/saltutil.py", line 291, in sync_states
        ret = _sync('states', saltenv)
      File "/usr/lib/python2.7/site-packages/salt/modules/saltutil.py", line 93, in _sync
        ret, touched = salt.utils.extmods.sync(__opts__, form, saltenv=saltenv)
      File "/usr/lib/python2.7/site-packages/salt/utils/extmods.py", line 127, in sync
        return ret, touched
    UnboundLocalError: local variable 'touched' referenced before assignment

I did have a custom module in /srv/salt/_modules/ but I got the same error when I removed the module from that directory

Versions Report


pkgrepo-backend03:
    Salt Version:
               Salt: 2016.3.1

    Dependency Versions:
               cffi: Not Installed
           cherrypy: Not Installed
           dateutil: Not Installed
              gitdb: Not Installed
          gitpython: Not Installed
              ioflo: Not Installed
             Jinja2: 2.7.2
            libgit2: Not Installed
            libnacl: Not Installed
           M2Crypto: 0.21.1
               Mako: Not Installed
       msgpack-pure: Not Installed
     msgpack-python: 0.4.7
       mysql-python: Not Installed
          pycparser: Not Installed
           pycrypto: 2.6.1
             pygit2: Not Installed
             Python: 2.7.5 (default, Nov 20 2015, 02:00:19)
       python-gnupg: Not Installed
             PyYAML: 3.11
              PyZMQ: 14.7.0
               RAET: Not Installed
              smmap: Not Installed
            timelib: Not Installed
            Tornado: 4.2.1
                ZMQ: 4.0.5

    System Versions:
               dist: centos 7.2.1511 Core
            machine: x86_64
            release: 3.10.0-123.8.1.el7.x86_64
             system: Linux
            version: CentOS Linux 7.2.1511 Core
@Ch3LL Ch3LL added Bug broken, incorrect, or confusing behavior P2 Priority 2 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Core relates to code central or existential to Salt labels Jun 30, 2016
@Ch3LL Ch3LL added this to the Approved milestone Jun 30, 2016
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 P2 Priority 2 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests

2 participants