salt-run fileserver.update Exception

Created on 1 Feb 2017  路  12Comments  路  Source: saltstack/salt

Description of Issue/Question

a Exception is being thrown by salt after salt-run fileserver.update updates the fileserver

Exception occurred in runner fileserver.update: Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/salt/client/mixins.py", line 397, in _low
    if 'data' in data['return']:
TypeError: argument of type 'bool' is not iterable

Setup

(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)
single gitfs repo

fileserver_backend:
  - git

gitfs_remotes:
  - [email protected]:whytewolf/salt-phase0-states.git:
    - pubkey: /root/.ssh/id_rsa.pub
    - privkey: /root/.ssh/id_rsa

and running salt-run fileserver.update

Steps to Reproduce Issue

(Include debug logs if possible and relevant.)
not sure if other git libs also cause this but currently have pygit2 0.25.0

salt-run -l debug fileserver.update
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Using cached minion ID from /etc/salt/minion_id: master-mom
[DEBUG   ] Missing configuration file: /root/.saltrc
[DEBUG   ] Configuration file path: /etc/salt/master
[WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
[DEBUG   ] LazyLoaded fileserver.update
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Including configuration from '/etc/salt/minion.d/_schedule.conf'
[DEBUG   ] Reading configuration from /etc/salt/minion.d/_schedule.conf
[DEBUG   ] Using cached minion ID from /etc/salt/minion_id: master-mom
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] MasterEvent PUB socket URI: /var/run/salt/master/master_event_pub.ipc
[DEBUG   ] MasterEvent PULL socket URI: /var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Initializing new IPCClient for path: /var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Sending event: tag = salt/run/20170201023737501187/new; data = {'fun': 'runner.fileserver.update', 'fun_args': [], 'jid': '20170201023737501187', 'user': 'root', '_stamp': '2017-02-01T02:37:38.059648'}
[DEBUG   ] pygit2 gitfs_provider enabled
[DEBUG   ] LazyLoaded git.envs
[DEBUG   ] Updating git fileserver cache
[DEBUG   ] Set update lock for gitfs remote '[email protected]:whytewolf/salt-phase0-states.git'
[DEBUG   ] Fetching gitfs remote '[email protected]:whytewolf/salt-phase0-states.git'
[DEBUG   ] gitfs remote '[email protected]:whytewolf/salt-phase0-states.git' is up-to-date
[DEBUG   ] pygit2 does not support detecting stale refs for authenticated remotes, saltenvs will not reflect branches/tags removed from remote '[email protected]:whytewolf/salt-phase0-states.git'
[DEBUG   ] Removed update lock for gitfs remote '[email protected]:whytewolf/salt-phase0-states.git'
[DEBUG   ] Sending event: tag = salt/run/20170201023737501187/ret; data = {'fun_args': [], 'jid': '20170201023737501187', 'return': 'Exception occurred in runner fileserver.update: Traceback (most recent call last):\n  File "/usr/lib/python2.7/site-packages/salt/client/mixins.py", line 397, in _low\n    if \'data\' in data[\'return\']:\nTypeError: argument of type \'bool\' is not iterable\n', 'success': False, '_stamp': '2017-02-01T02:37:39.234397', 'user': 'root', 'fun': 'runner.fileserver.update'}
[DEBUG   ] LazyLoaded nested.output
Exception occurred in runner fileserver.update: Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/salt/client/mixins.py", line 397, in _low
    if 'data' in data['return']:
TypeError: argument of type 'bool' is not iterable
[DEBUG   ] LazyLoaded local_cache.prep_jid
[INFO    ] Runner completed: 20170201023737501187
[DEBUG   ] Runner return: Exception occurred in runner fileserver.update: Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/salt/client/mixins.py", line 397, in _low
    if 'data' in data['return']:
TypeError: argument of type 'bool' is not iterable

Versions Report

(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)

salt-run --versions
Salt Version:
           Salt: 2016.11.2

Dependency Versions:
           cffi: 1.9.1
       cherrypy: 3.2.2
       dateutil: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: 0.25.0
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: Not Installed
      pycparser: 2.17
       pycrypto: 2.6.1
         pygit2: 0.25.0
         Python: 2.7.5 (default, Nov  6 2016, 00:28:07)
   python-gnupg: Not Installed
         PyYAML: 3.10
          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.3.1611 Core
        machine: x86_64
        release: 3.10.0-514.6.1.el7.x86_64
         system: Linux
        version: CentOS Linux 7.3.1611 Core
Bug Core P1 Regression fixed-pending-your-verification severity-medium

Most helpful comment

Do you have any estimation of when this fix will be released in the packages as well?

Having the same issue on CentOS:

$ sudo salt-run fileserver.update gitfs 
Exception occurred in runner fileserver.update: Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/salt/client/mixins.py", line 397, in _low
    if 'data' in data['return']:
TypeError: argument of type 'bool' is not iterable
Salt Version:
           Salt: 2016.11.2

Dependency Versions:
           cffi: Not Installed
       cherrypy: 3.2.2
       dateutil: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.8.1
        libgit2: 0.20.0
        libnacl: Not Installed
       M2Crypto: 0.20.2
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
         pygit2: 0.20.3
         Python: 2.6.6 (r266:84292, Aug 18 2016, 15:13:37)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 14.5.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: 0.2.4
        Tornado: 4.2.1
            ZMQ: 4.0.5

System Versions:
           dist: centos 6.8 Final
        machine: x86_64
        release: 2.6.32-642.11.1.el6.x86_64
         system: Linux
        version: CentOS 6.8 Final

All 12 comments

I think this may have the same root cause as https://github.com/saltstack/salt/issues/38638.

I'm seeing the same thing, and I believe it worked on 2016.11.1. For reference, I'm running master as a dedicated, non-root user.

salt-run fileserver.update
Exception occurred in runner fileserver.update: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/salt/client/mixins.py", line 397, in _low
    if 'data' in data['return']:
TypeError: argument of type 'bool' is not iterable

```salt --versions-report
Salt Version:
Salt: 2016.11.2

Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.4.2
gitdb: 0.5.4
gitpython: 0.3.2 RC1
ioflo: Not Installed
Jinja2: 2.9.4
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.21.1
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.9 (default, Jun 29 2016, 13:08:31)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 14.4.0
RAET: Not Installed
smmap: 0.8.2
timelib: Not Installed
Tornado: 4.4.2
ZMQ: 4.0.5

System Versions:
dist: debian 8.7
machine: x86_64
release: 3.16.0-4-amd64
system: Linux
version: debian 8.7
```

Here's the PR that introduced the bug: https://github.com/saltstack/salt/pull/38251

CC @ewapptus

Thank you @mirceaulinic and I am sorry this leaked out to production.

Thanks for the pr to fix this @mirceaulinic

Do you have any estimation of when this fix will be released in the packages as well?

Having the same issue on CentOS:

$ sudo salt-run fileserver.update gitfs 
Exception occurred in runner fileserver.update: Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/salt/client/mixins.py", line 397, in _low
    if 'data' in data['return']:
TypeError: argument of type 'bool' is not iterable
Salt Version:
           Salt: 2016.11.2

Dependency Versions:
           cffi: Not Installed
       cherrypy: 3.2.2
       dateutil: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.8.1
        libgit2: 0.20.0
        libnacl: Not Installed
       M2Crypto: 0.20.2
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
         pygit2: 0.20.3
         Python: 2.6.6 (r266:84292, Aug 18 2016, 15:13:37)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 14.5.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: 0.2.4
        Tornado: 4.2.1
            ZMQ: 4.0.5

System Versions:
           dist: centos 6.8 Final
        machine: x86_64
        release: 2.6.32-642.11.1.el6.x86_64
         system: Linux
        version: CentOS 6.8 Final

Also seeing this when running test.sleep in orchestration state:

Orchestration sls:

pause_run:                                                              
  salt.runner:                                                          
    - name: test.sleep                                                          
    - s_time: 120                                            
 ``` 

Salt version: **2016.11.2**

Error
====

[ERROR ] Exception occurred in runner test.sleep: Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/salt/client/mixins.py", line 397, in _low
if 'data' in data['return']:
TypeError: argument of type 'bool' is not iterable
```

This should be fixed in 2016.11 branch, and will be a part of the 2016.11.3 release later this month.

Just tested on 2016.11.3 and working great! :+1:

Yay! I love good news!

Thanks

Thanks all.

Was this page helpful?
0 / 5 - 0 ratings