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

rsync.synchronized: "An exception occurred in this state: 'Changes' should be a dictionary." #52036

Open
ghost opened this issue Mar 7, 2019 · 2 comments

Comments

@ghost
Copy link

commented Mar 7, 2019

Description of Issue/Question

Setup

Saltfile:

salt-ssh:
  roster_file: salt/roster
  config_dir: salt
  log_file: salt/ssh.log

salt/master:

root_dir: salt
file_roots:
  base:
    - salt/states
pillar_roots:
  base:
    - salt/pillars

salt/roster:

NODENAME:
  host: ...
  user: ...
  sudo: True
  tty: True

salt/states/restart.sls:

sync APP JAR:
  rsync.synchronized:
    - name: /opt/APP
    - source: snapshot.jar

reload systemd daemon:
  module.run:
    - name: service.systemctl_reload

restart APP service:
  module.run:
    - name: service.restart
    - m_name: APP

Steps to Reproduce Issue

salt-ssh --priv="$1" '*' state.apply restart

Expected Output

          ID: sync APP JAR
[...]
     Changes:   
              ----------
              ret:
                  True

Actual Output

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: sync APP JAR
    Function: rsync.synchronized
        Name: /opt/APP
      Result: False
     Comment: An exception occurred in this state: 'Changes' should be a dictionary.
     Changes:   

Versions Report

Salt Version:
           Salt: 2019.2.0
 
Dependency Versions:
           cffi: 1.12.2
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: 2.6.0
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.10
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.1
   mysql-python: Not Installed
      pycparser: 2.19
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.15 (default, Oct 15 2018, 15:26:09)
   python-gnupg: Not Installed
         PyYAML: 3.13
          PyZMQ: 17.0.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 5.1.1
            ZMQ: 4.1.6
 
System Versions:
           dist: fedora 29 Twenty Nine
         locale: UTF-8
        machine: x86_64
        release: 4.20.13-200.fc29.x86_64
         system: Linux
        version: Fedora 29 Twenty Nine
@devurandom

This comment has been minimized.

Copy link

commented Mar 7, 2019

Also reproducible when syncing directories instead of single files.

@trc-af

This comment has been minimized.

Copy link

commented Oct 4, 2019

This issue also exists on Salt 2018.3.4 on Ubuntu 16.04.

SLS

# rsync local dirs
rsync-local-dir:
  rsync.synchronized:
    - name: /usr/local/dir
    - source: /misc/mirror/dir/
    - force: True

Output

----------
          ID: rsync-local-dir
    Function: rsync.synchronized
        Name: /usr/local/dir
      Result: False
     Comment: An exception occurred in this state: 'Changes' should be a dictionary.
     Changes:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.