Skip to content

[BUG] gitfs fails to work after upgraded to 3007.4 #68072

@hailong1004

Description

@hailong1004

Description
gitfs fails to work after upgraded to 3007.4

Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)

Please be as specific as possible and give set-up details.

  • on-prem machine
  • VM (Virtualbox, KVM, etc. please specify)
  • VM running on a cloud service, please be explicit and add details
  • container (Kubernetes, Docker, containerd, etc. please specify)
  • or a combination, please be explicit
  • jails if it is FreeBSD
  • classic packaging
  • onedir packaging
  • used bootstrap to install

Steps to Reproduce the behavior
salt-master and salt-minion is 3007.3, gitfs work normal. only when I upgrade salt-master and salt-minion from 3007.3 to 3007.4, when minion run salt-call state.sls system-base, get error:

local:
    Data failed to compile:
----------
    No matching sls found for 'system-base' in env 'base'

master error log:

2025-06-13 03:57:51,359 [salt.master      :2109][ERROR   ][232] Error in function _file_hash:
Traceback (most recent call last):
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/master.py", line 2103, in run_func
    ret = getattr(self, func)(load)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/fileserver/__init__.py", line 650, in file_hash
    return self.__file_hash_and_stat(load)[0]
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/fileserver/__init__.py", line 634, in __file_hash_and_stat
    fnd = self.find_file(
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/fileserver/__init__.py", line 592, in find_file
    fnd = self.servers[fstr](path, saltenv, **kwargs)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 160, in __call__
    ret = self.loader.run(run_func, *args, **kwargs)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1269, in run
    return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1284, in _run_as
    ret = _func_or_method(*args, **kwargs)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/fileserver/gitfs.py", line 160, in find_file
    return _gitfs().find_file(path, tgt_env=tgt_env, **kwargs)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/gitfs.py", line 3286, in find_file
    dest = salt.utils.verify.clean_join(self.cache_root, "refs", tgt_env, path)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/verify.py", line 567, in clean_join
    raise SaltValidationError(f"Invalid path: {path!r}")
salt.exceptions.SaltValidationError: Invalid path: 'system-base/init.sls'
2025-06-13 03:57:51,368 [salt.master      :2109][ERROR   ][241] Error in function _file_find:
Traceback (most recent call last):
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/master.py", line 2103, in run_func
    ret = getattr(self, func)(load)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/fileserver/__init__.py", line 540, in _find_file
    return self.find_file(path, tgt_env)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/fileserver/__init__.py", line 592, in find_file
    fnd = self.servers[fstr](path, saltenv, **kwargs)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 160, in __call__
    ret = self.loader.run(run_func, *args, **kwargs)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1269, in run
    return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1284, in _run_as
    ret = _func_or_method(*args, **kwargs)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/fileserver/gitfs.py", line 160, in find_file
    return _gitfs().find_file(path, tgt_env=tgt_env, **kwargs)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/gitfs.py", line 3286, in find_file
    dest = salt.utils.verify.clean_join(self.cache_root, "refs", tgt_env, path)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/verify.py", line 567, in clean_join
    raise SaltValidationError(f"Invalid path: {path!r}")
salt.exceptions.SaltValidationError: Invalid path: 'system-base/init.sls'

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Versions Report

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

Python Version:
        Python: 3.10.17 (main, Jun  9 2025, 20:41:48) [GCC 11.2.0]

Dependency Versions:
          cffi: 1.16.0
      cherrypy: unknown
  cryptography: 42.0.5
      dateutil: 2.8.2
     docker-py: 1.10.6
         gitdb: 4.0.12
     gitpython: Not Installed
        Jinja2: 3.1.6
       libgit2: 1.7.2
  looseversion: 1.3.0
      M2Crypto: 0.45.1
          Mako: 1.3.10
       msgpack: 1.0.7
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 24.0
     pycparser: 2.21
      pycrypto: 2.6.1
  pycryptodome: 3.19.1
        pygit2: 1.14.1
  python-gnupg: 0.5.2
        PyYAML: 6.0.1
         PyZMQ: 25.1.2
        relenv: 0.19.3
         smmap: 5.0.2
       timelib: 0.3.0
       Tornado: 6.4.2
           ZMQ: 4.3.4

Salt Package Information:
  Package Type: onedir

System Versions:
          dist: ubuntu 22.04.5 jammy
        locale: utf-8
       machine: x86_64
       release: 5.15.0-122-generic
        system: Linux
       version: Ubuntu 22.04.5 jammy

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

Bugbroken, incorrect, or confusing behavior

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions