Salt: zenoss state: Fails with: 'Changes' should be a dictionary.

Created on 23 Jul 2019  路  8Comments  路  Source: saltstack/salt

Description of Issue

This issue exists only on v2018 and v2019

When prod_state is not set, and the device exists on Zenoss we get the following error running the state:

[root@centos7-5 ~]# salt-call state.sls zenoss
local:
The State execution failed to record the order in which all states were executed. The state return missing data is:
{u'changes': {},
 u'comment': u"An exception occurred in this state: 'Changes' should be a dictionary.",
 u'name': u'later',
 u'result': False}
----------
          ID: zenoss_device_registration
    Function: zenoss.monitored
        Name: centos7-5.local
      Result: False
     Comment: An exception occurred in this state: 'Changes' should be a dictionary.
     Changes:

The problem is on the following lines: https://github.com/saltstack/salt/blob/develop/salt/states/zenoss.py#L56-L62

It can also happen here: https://github.com/saltstack/salt/blob/develop/salt/states/zenoss.py#L88-L91

Should changes be set to an empty dict? None used to be an accepted value before v2018.

Steps to Reproduce Issue

Run the state below with device already on Zenoss.

zenoss_device_registration:
  zenoss.monitored:
    - name: centos7-5.local
    - device_class: /Server/SSH/Linux

Versions Report

Salt Version:
           Salt: 2018.3.4

Dependency Versions:
           cffi: 1.6.0
       cherrypy: Not Installed
       dateutil: 1.5
      docker-py: Not Installed
          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.6
   mysql-python: Not Installed
      pycparser: 2.14
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.5 (default, Jul 13 2018, 13:06:57)
   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.5.1804 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-862.11.6.el7.x86_64
         system: Linux
        version: CentOS Linux 7.5.1804 Core
Bug severity-low

Most helpful comment

The issue is not stale. There has been no response from the developers. This bot is damaging to the project as it closes valid issues and drives contributors away.

All 8 comments

@rossengeorgiev Thank you for reporting this!

hi @dwoz, how do I fix this? What should the value of changes be, when there are no changes?

i have same bug in 2019.2.2. First time i`m seen it after upgrade salt to 2019.2.2

The State execution failed to record the order in which all states were executed. The state return missing data is: {u'changes': {}, u'comment': u"An exception occurred in this state: 'Changes' should be a dictionary.", u'name': u'later', u'result': False} The State execution failed to record the order in which all states were executed. The state return missing data is: {u'changes': {}, u'comment': u"An exception occurred in this state: 'Changes' should be a dictionary.", u'name': u'later', u'result': False} The State execution failed to record the order in which all states were executed. The state return missing data is: {u'changes': {}, u'comment': u"An exception occurred in this state: 'Changes' should be a dictionary.", u'name': u'later', u'result': False}

----------
          ID: rsyslog
    Function: file.managed
        Name: /etc/rsyslog.conf
      Result: False
     Comment: An exception occurred in this state: 'Changes' should be a dictionary.
     Changes:
----------
          ID: rsyslog
    Function: file.managed
        Name: /etc/rsyslog.d/rsyslog-pgfront_imfile.conf.jinja.conf
      Result: False
     Comment: An exception occurred in this state: 'Changes' should be a dictionary.
     Changes:
----------
          ID: rsyslog
    Function: file.managed
        Name: /etc/rsyslog.d/rsyslog.conf.jinja.conf
      Result: False
     Comment: An exception occurred in this state: 'Changes' should be a dictionary.
     Changes:

Version report

Salt-master version report:
```Salt Version:
Salt: 2019.2.2

Dependency Versions:
cffi: 1.13.1
cherrypy: 5.6.0
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.10.3
libgit2: Not Installed
libnacl: 1.6.1
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: Not Installed
pycparser: 2.19
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.5 (default, Aug 4 2017, 00:39:18)
python-gnupg: Not Installed
PyYAML: 5.1.2
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.4.1708 Core
locale: UTF-8
machine: x86_64
release: 4.19.12-2.rambler.el7.x86_64
system: Linux
version: CentOS Linux 7.4.1708 Core


Salt-minion:
```Salt Version:
               Salt: 2019.2.2

    Dependency Versions:
               cffi: Not Installed
           cherrypy: Not Installed
           dateutil: Not Installed
          docker-py: Not Installed
              gitdb: Not Installed
          gitpython: Not Installed
              ioflo: Not Installed
             Jinja2: 2.8
            libgit2: Not Installed
            libnacl: Not Installed
           M2Crypto: Not Installed
               Mako: Not Installed
       msgpack-pure: Not Installed
     msgpack-python: 0.5.6
       mysql-python: Not Installed
          pycparser: Not Installed
           pycrypto: 2.6.1
       pycryptodome: Not Installed
             pygit2: Not Installed
             Python: 2.7.5 (default, Aug  4 2017, 00:39:18)
       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.4.1708 Core
             locale: ascii
            machine: x86_64
            release: 4.13.6-5.rambler.seege.ovl.el7.centos.x86_64
             system: Linux
            version: CentOS Linux 7.4.1708 Core

Steps for reproduce

rsyslog.sls:

{% set configfiles = salt['pillar.get']('rsyslog:files',[]) %}
rsyslog:
  file.managed:
    - names:
{%- for logconf in configfiles %}
      - {{ etcdir }}/rsyslog.d/{{ logconf }}.conf: 
        - source: salt://{{ slspath }}/files/{{ rsyslog.confdir }}/{{ logconf }}
        - template: jinja
        - user: root
        - group: root
        - mode: 644
        - require:
          - pkg: rsyslog
{%- endfor %}

I am facing same bug in same version 2019.2.2.

Error:

The State execution failed to record the order in which all states were executed. The state return missing data is:
{u'changes': {},
u'comment': u"An exception occurred in this state: 'Changes' should be a dictionary.",
u'name': u'later',
u'result': False}

Salt State:

cat /srv/salt/sapconf/sap-vs-netweaver.sls


  sapconf_cust_profiles_vs-netweaver:
    file.directory:
      - name: /etc/tuned/sap-vs-netweaver
      - source: /usr/lib/tuned/sap-netweaver
      - makedirs: True
      - mode: 755

  sapconf_cust_profiles_netweaver_tuned.conf:
    file.managed:
      - name: /etc/tuned/sap-vs-netweaver/tuned.conf
      - source: salt://sapconf/files/sap-vs-netweaver.conf
      - require:
          - file: sapconf_cust_profiles_vs-netweaver

  sapconf_cust_profiles_sap-vs-netweaver_script.sh:
    file.managed:
      - name: /etc/tuned/sap-vs-netweaver/script.sh
      - source: /usr/lib/tuned/sap-netweaver/script.sh
      - require:
          - file: sapconf_cust_profiles_vs-netweaver

Version:

Salt Version:
           Salt: 2019.2.2

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 1.5
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: 0.31.0
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.5 (default, Jun 11 2019, 14:33:56)
   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: redhat 7.4 Maipo
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-693.21.1.el7.x86_64
         system: Linux
        version: Red Hat Enterprise Linux Server 7.4 Maipo

It will be great help if saltstack fix this issue ASAP.

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.

The issue is not stale. There has been no response from the developers. This bot is damaging to the project as it closes valid issues and drives contributors away.

Thank you for updating this issue. It is no longer marked as stale.

I take it there is still no response from developers? I'm also experiencing this issue.

Was this page helpful?
0 / 5 - 0 ratings