'An un-handled exception was caught by salt's global exception handler' after upgrade to 0.17

694 views
Skip to first unread message

schlag

unread,
Oct 3, 2013, 12:23:19 PM10/3/13
to salt-...@googlegroups.com
Hi,

I upgraded my master to 0.17 along with a couple minions, and am now getting an exception when running highstate.  I've spent a bit of time trying to identify the culprit, but am coming up dry.  

[DEBUG   ] Results of YAML rendering: 
OrderedDict([('include', ['environments.all.repos.salt', 'environments.all.monitoring.monit', 'environments.all.syslog.rsyslog']), ('/etc/salt/minion', OrderedDict([('file.managed', [OrderedDict([('template', 'jinja')]), OrderedDict([('source', 'salt://environments/all/salt/files/etc.salt.minion.jinja')]), OrderedDict([('user', 'root')]), OrderedDict([('group', 'root')]), OrderedDict([('mode', 644)])])])), ('/etc/init.d/salt-minion.dpkg-old', 'file.absent'), ('debconf-utils', 'pkg.installed'), ('salt minions', OrderedDict([('service.running', [OrderedDict([('name', 'salt-minion')]), OrderedDict([('enable', True)]), OrderedDict([('require', [OrderedDict([('file', '/etc/salt/minion')])])]), OrderedDict([('watch', [OrderedDict([('file', '/etc/salt/minion')])])])]), ('pkg.installed', [OrderedDict([('names', ['salt-minion', 'salt-common'])]), OrderedDict([('fromrepo', 'squeeze-saltstack')]), OrderedDict([('require', [OrderedDict([('file', '/etc/apt/sources.list.d/squeeze-salt.list')])])])])])), ('/etc/rsyslog.d/salt-minion.conf', OrderedDict([('file.managed', [OrderedDict([('template', 'jinja')]), OrderedDict([('source', 'salt://environments/all/syslog/files/etc.rsyslog.d.salt-minion.conf')]), OrderedDict([('user', 'root')]), OrderedDict([('group', 'root')]), OrderedDict([('mode', 644)]), OrderedDict([('watch_in', [OrderedDict([('service', 'rsyslog')])])])])])), ('/etc/monit/conf.d/salt-minion.conf', OrderedDict([('file.managed', [OrderedDict([('template', 'jinja')]), OrderedDict([('source', 'salt://environments/all/monitoring/files/etc.monit.conf.d.salt-minion.conf.jinja')]), OrderedDict([('watch_in', [OrderedDict([('service', 'monit')])])])])])), ('add random salt-call state.highstate > /dev/null 2>&1', OrderedDict([('cron.absent', [OrderedDict([('name', 'salt-call state.highstate > /dev/null 2>&1')]), OrderedDict([('user', 'root')]), OrderedDict([('minute', 'random')]), OrderedDict([('hour', '*')])])])), ('/etc/cron.d/salt.conf', OrderedDict([('file.managed', [OrderedDict([('template', 'jinja')]), OrderedDict([('source', 'salt://environments/all/salt/files/etc.cron.d.salt.conf.jinja')]), OrderedDict([('user', 'root')]), OrderedDict([('group', 'root')]), OrderedDict([('mode', 644)])])]))])
[INFO    ] Fetching file ** skipped **, latest already in cache 'salt://environments/all/repos/salt.sls'
[DEBUG   ] Jinja search path: '['/var/cache/salt/minion/files/base']'
[DEBUG   ] Rendered data from file: /var/cache/salt/minion/files/base/environments/all/repos/salt.sls:
  cmd.run:
    - unless:        apt-key list | egrep "F2AE6AB9"

/etc/apt/sources.list.d/squeeze-salt.list:
  file.managed:
    - source:   salt://environments/all/repos/files/squeeze-salt.list 
    - user:     root
    - group:    root
    - mode:     644


[DEBUG   ] Results of YAML rendering: 
OrderedDict([('wget -O - http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key|apt-key add -', OrderedDict([('cmd.run', [OrderedDict([('unless', apt-key list | egrep "F2AE6AB9")])])])), ('/etc/apt/sources.list.d/squeeze-salt.list', OrderedDict([('file.managed', [OrderedDict([('source', 'salt://environments/all/repos/files/squeeze-salt.list')]), OrderedDict([('user', 'root')]), OrderedDict([('group', 'root')]), OrderedDict([('mode', 644)])])]))])
[DEBUG   ] loading output in ['/var/cache/salt/minion/extmods/output', '/usr/lib/python2.6/dist-packages/salt/output']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/output, it is not a directory
[DEBUG   ] Loaded no_out as virtual quiet
[DEBUG   ] Loaded json_out as virtual json
[DEBUG   ] Loaded yaml_out as virtual yaml
[DEBUG   ] Loaded pprint_out as virtual pprint
[ERROR   ] An un-handled exception was caught by salt's global exception handler:
TypeError: list indices must be integers, not str
Traceback (most recent call last):
  File "/usr/bin/salt-call", line 11, in <module>
    salt_call()
  File "/usr/lib/python2.6/dist-packages/salt/scripts.py", line 77, in salt_call
    client.run()
  File "/usr/lib/python2.6/dist-packages/salt/cli/__init__.py", line 303, in run
    caller.run()
  File "/usr/lib/python2.6/dist-packages/salt/cli/caller.py", line 141, in run
    self.opts)
  File "/usr/lib/python2.6/dist-packages/salt/output/__init__.py", line 30, in display_output
    display_data = get_printout(out, opts)(data).rstrip()
  File "/usr/lib/python2.6/dist-packages/salt/output/highstate.py", line 55, in output
    data[host] = _strip_clean(data[host])
  File "/usr/lib/python2.6/dist-packages/salt/output/highstate.py", line 213, in _strip_clean
    if returns[tag]['result'] and not returns[tag]['changes']:
TypeError: list indices must be integers, not str
Traceback (most recent call last):
  File "/usr/bin/salt-call", line 11, in <module>
    salt_call()
  File "/usr/lib/python2.6/dist-packages/salt/scripts.py", line 77, in salt_call
    client.run()
  File "/usr/lib/python2.6/dist-packages/salt/cli/__init__.py", line 303, in run
    caller.run()
  File "/usr/lib/python2.6/dist-packages/salt/cli/caller.py", line 141, in run
    self.opts)
  File "/usr/lib/python2.6/dist-packages/salt/output/__init__.py", line 30, in display_output
    display_data = get_printout(out, opts)(data).rstrip()
  File "/usr/lib/python2.6/dist-packages/salt/output/highstate.py", line 55, in output
    data[host] = _strip_clean(data[host])
  File "/usr/lib/python2.6/dist-packages/salt/output/highstate.py", line 213, in _strip_clean
    if returns[tag]['result'] and not returns[tag]['changes']:
TypeError: list indices must be integers, not str


I can provide the entire debug output, but I need to obfuscate some things.

The state listed before the exception looks like this, and it runs fine with 'salt-call state.sls environments.all.repos.salt':

  cmd.run:
    - unless:        apt-key list | egrep "F2AE6AB9"

/etc/apt/sources.list.d/{{ grains.get('lsb_distrib_codename') }}-salt.list:
  file.managed:
    - user:     root
    - group:    root
    - mode:     644
    - contents: |
        deb http://debian.saltstack.com/debian {{ grains.get('lsb_distrib_codename') }}-saltstack main

My minions still running 0.16.3 are able to run their highstates normally.  Any ideas?  Is there other information that I can provide?  Thanks in advance

Master info:
salt-call --versions-report
           Salt: 0.17.0
         Python: 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
         Jinja2: 2.5.5
       M2Crypto: 0.20.1
 msgpack-python: 0.1.10
   msgpack-pure: Not Installed
       pycrypto: 2.1.0
         PyYAML: 3.09
          PyZMQ: 13.1.0
            ZMQ: 3.2.3

Minion info:
salt-call --versions-report
           Salt: 0.17.0
         Python: 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
         Jinja2: 2.5.5
       M2Crypto: 0.20.1
 msgpack-python: 0.1.10
   msgpack-pure: Not Installed
       pycrypto: 2.1.0
         PyYAML: 3.09
          PyZMQ: 13.1.0
            ZMQ: 3.2.3


Erik Johnson

unread,
Oct 3, 2013, 9:11:01 PM10/3/13
to salt-...@googlegroups.com
I tried your example states against 0.17.0 on Debian Wheezy and was not able to reproduce the traceback.


--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Erik Johnson | Engineer

5272 South College Drive, Suite 301 | Murray, UT 84123
er...@saltstack.com | http://saltstack.com

Erik Johnson

unread,
Oct 3, 2013, 9:11:23 PM10/3/13
to salt-...@googlegroups.com
Are you sure it was these two states that caused the traceback?

schlag

unread,
Oct 4, 2013, 8:33:41 AM10/4/13
to salt-...@googlegroups.com
Erik, yeah see that is the problem, that is a partial of the debug output which includes the last two states before the error occurs. It is not clear to me what is causing the actual issue, but the states appear to be fine. I'll work on providing the entire debug output, but i need to spend some time obfuscating some of it.
Reply all
Reply to author
Forward
0 new messages