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

file.get_diff not work on version:2018.3.2 #48996

Closed
jils2013 opened this Issue Aug 8, 2018 · 2 comments

Comments

@jils2013

jils2013 commented Aug 8, 2018

Description of Issue/Question

Run file.get_diff on version:2018.3.2,get "ERROR: Failed to read salt://aio/...: No such file or directory", and the file does exist

Setup

master:2018.3.2
minion:2018.3.2(other minion on version:2017.7.4 is ok)

Steps to Reproduce Issue

[root@master-host` salt]# salt minion-host cp.cache_file salt://aio/archive/archive.tar.md5
minion-host:
    /var/cache/salt/minion/files/base/aio/archive/archive.tar.md5
[root@master-host salt]# salt minion-host file.get_diff /.archive.tar.md5 salt://aio/archive/archive.tar.md5
minion-host:
    ERROR: Failed to read salt://aio/archive/archive.tar.md5: No such file or directory

on minion node,debug log:

[INFO    ] Starting a new job with PID 7373
[DEBUG   ] LazyLoaded cp.cache_file
[DEBUG   ] LazyLoaded direct_call.execute
[DEBUG   ] Initializing new AsyncZeroMQReqChannel for (u'/etc/salt/pki/minion', u'minion-host', u'tcp://10.1.1.100:4506', u'aes')
[DEBUG   ] Initializing new AsyncAuth for (u'/etc/salt/pki/minion', u'minion-host', u'tcp://10.1.1.100:4506')
[DEBUG   ] Connecting the Minion to the Master URI (for the return server): tcp://10.1.1.100:4506
[DEBUG   ] Trying to connect to: tcp://10.1.1.100:4506
[DEBUG   ] In saltenv 'base', looking at rel_path 'aio/archive/archive.tar.md5' to resolve 'salt://aio/archive/archive.tar.md5'
[DEBUG   ] In saltenv 'base', ** considering ** path '/var/cache/salt/minion/files/base/aio/archive/archive.tar.md5' to resolve 'salt://aio/archive/archive.tar.md5'
[DEBUG   ] Minion return retry timer set to 7 seconds (randomized)
[INFO    ] Returning information for job: 20180808190340722939
[DEBUG   ] Initializing new AsyncZeroMQReqChannel for (u'/etc/salt/pki/minion', u'minion-host', u'tcp://10.1.1.100:4506', u'aes')
[DEBUG   ] Initializing new AsyncAuth for (u'/etc/salt/pki/minion', u'minion-host', u'tcp://10.1.1.100:4506')
[DEBUG   ] Connecting the Minion to the Master URI (for the return server): tcp://10.1.1.100:4506
[DEBUG   ] Trying to connect to: tcp://10.1.1.100:4506
[DEBUG   ] minion return: {u'fun_args': [u'salt://aio/archive/archive.tar.md5'], u'jid': u'20180808190340722939', u'return': u'/var/cache/salt/minion/files/base/aio/archive/archive.tar.md5', u'retcode': 0, u'success': True, u'fun': u'cp.cache_file'}
[INFO    ] User root Executing command file.get_diff with jid 20180808190346684060
[DEBUG   ] Command details {u'tgt_type': u'glob', u'jid': u'20180808190346684060', u'tgt': u'minion-host', u'ret': u'', u'user': u'root', u'arg': [u'/.archive.tar.md5', u'salt://aio/archive/archive.tar.md5'], u'fun': u'file.get_diff'}
[INFO    ] Starting a new job with PID 7387
[DEBUG   ] LazyLoaded file.get_diff
[DEBUG   ] LazyLoaded direct_call.execute
[DEBUG   ] LazyLoaded cp.cache_file
[DEBUG   ] Initializing new AsyncZeroMQReqChannel for (u'/etc/salt/pki/minion', u'minion-host', u'tcp://10.1.1.100:4506', u'aes')
[DEBUG   ] Initializing new AsyncAuth for (u'/etc/salt/pki/minion', u'minion-host', u'tcp://10.1.1.100:4506')
[DEBUG   ] Connecting the Minion to the Master URI (for the return server): tcp://10.1.1.100:4506
[DEBUG   ] Trying to connect to: tcp://10.1.1.100:4506
[DEBUG   ] In saltenv 'base', looking at rel_path 'aio/archive/archive.tar.md5' to resolve 'salt://aio/archive/archive.tar.md5'
[DEBUG   ] In saltenv 'base', ** considering ** path '/var/cache/salt/minion/files/base/aio/archive/archive.tar.md5' to resolve 'salt://aio/archive/archive.tar.md5'
[ERROR   ] A command in 'file.get_diff' had a problem: Failed to read salt://aio/archive/archive.tar.md5: No such file or directory
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/salt/minion.py", line 1606, in _thread_return
    return_data = minion_instance.executors[fname](opts, data, func, args, kwargs)
  File "/usr/lib/python2.7/site-packages/salt/executors/direct_call.py", line 12, in execute
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/salt/modules/file.py", line 4990, in get_diff
    exc.strerror
CommandExecutionError: Failed to read salt://aio/archive/archive.tar.md5: No such file or directory
[DEBUG   ] Minion return retry timer set to 8 seconds (randomized)
[INFO    ] Returning information for job: 20180808190346684060
[DEBUG   ] Initializing new AsyncZeroMQReqChannel for (u'/etc/salt/pki/minion', u'minion-host', u'tcp://10.1.1.100:4506', u'aes')
[DEBUG   ] Initializing new AsyncAuth for (u'/etc/salt/pki/minion', u'minion-host', u'tcp://10.1.1.100:4506')
[DEBUG   ] Connecting the Minion to the Master URI (for the return server): tcp://10.1.1.100:4506
[DEBUG   ] Trying to connect to: tcp://10.1.1.100:4506
[DEBUG   ] minion return: {u'fun_args': [u'/.archive.tar.md5', u'salt://aio/archive/archive.tar.md5'], u'jid': u'20180808190346684060', u'return': u'ERROR: Failed to read salt://aio/archive/archive.tar.md5: No such file or directory', u'success': False, u'fun': u'file.get_diff', u'out': u'nested'}

Versions Report

minion version

Salt Version:
           Salt: 2018.3.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.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: 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.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.4.1708 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-693.el7.x86_64
         system: Linux
        version: CentOS Linux 7.4.1708 Core

master version

Salt Version:
           Salt: 2018.3.2
 
Dependency Versions:
           cffi: Not Installed
       cherrypy: unknown
       dateutil: Not Installed
      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: 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: UTF-8
        machine: x86_64
        release: 3.10.0-693.el7.x86_64
         system: Linux
        version: CentOS Linux 7.4.1708 Core
@Ch3LL

This comment has been minimized.

Contributor

Ch3LL commented Aug 8, 2018

looks like i'm able to bisect this to commit 3184168

ping @terminalmage any ideas here?

@terminalmage

This comment has been minimized.

Member

terminalmage commented Aug 9, 2018

Fixed in #49033.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment