Thanks to visit codestin.com
Credit goes to github.com

Skip to content

file.recurse fails for a single file #45151

@rhavenn

Description

@rhavenn

I have a file.recurse to sync root's .vim config directory. It fails on a single file. The rest of the files are copied correctly. If I rename the file it still fails. If I move the file out of the directory then they file.recurse works. I see nothing wierd about the file. It's just a .vim color scheme config file.

minion and master are on the same server.

salt version:

Salt Version:
           Salt: 2017.7.2

Dependency Versions:
           cffi: 1.7.0
       cherrypy: Not Installed
       dateutil: 2.6.1
      docker-py: Not Installed
          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.4.7
   mysql-python: Not Installed
      pycparser: 2.10
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 3.6.3 (default, Dec 15 2017, 09:19:02)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 16.0.3
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.2
            ZMQ: 4.2.2

System Versions:
           dist:
         locale: UTF-8
        machine: amd64
        release: 11.1-RELEASE-p4
         system: FreeBSD
        version: Not Installed

The .sls file section:

root_dotvim_dir:
  file.recurse:
    - name: /root/.vim
    - clean: true
    - user: root
    - group: wheel
    - dir_mode: 755
    - file_mode: 644
    - source:
      - salt://files/server/freebsd/templates/root_dotvim.d.template.{{ grains['owner'] }}.{{ grains['localhost'] }}
      - salt://files/server/freebsd/templates/root_dotvim.d.template.{{ grains['owner'] }}.{{ grains['baseclass'] }}
      - salt://files/server/freebsd/templates/root_dotvim.d.template.{{ grains['owner'] }}
      - salt://files/server/freebsd/templates/root_dotvim.d.template

The error I get is:

          ID: root_dotvim_dir
    Function: file.recurse
        Name: /root/.vim
      Result: False
     Comment: #### /root/.vim/colors/neverness.vim ####
              Source file 'salt://files/server/freebsd/templates/root_dotvim.d.template/colors/neverness.vim?saltenv=base' not found
     Started: 22:38:14.741454
    Duration: 1296.26 ms
     Changes:

I can delete ~root/.vim completely and it copies everything back except the one file.

I don't see anything weird in the file and it's not corrupt. I can copy it, move it, edit it, and rename it without issue. vim / cat / less works fine on the file.

Metadata

Metadata

Assignees

Labels

bugbroken, incorrect, or confusing behaviorseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions