saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
14.11k stars 5.47k forks source link

[BUG] Failed to load grains defined in grain file zfs #62315

Open shivkumarsah opened 2 years ago

shivkumarsah commented 2 years ago

Description Unable to run any state on syndic from self or MasterOfMaster, after upgrading salt stack to 3003.4 from 3002.6

Error: Failed to load grains defined in grain file zfs. I'm not using ZFS utility in my flow

Setup on prem setup of salt community

2022-07-07 14:59:50,682 [salt.loader      :933 ][CRITICAL][24496] Failed to load grains defined in grain file zfs.zfs in function <salt.loader.LoadedFunc object at 0x7efcf4be26d8>, error:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/salt/loader.py", line 922, in grains
    ret = funcs[key](**kwargs)
  File "/usr/lib/python3.6/site-packages/salt/loader.py", line 1241, in __call__
    return self.loader.run(run_func, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/salt/loader.py", line 2274, in run
    return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/contextvars/__init__.py", line 38, in run
    return callable(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/salt/loader.py", line 2289, in _run_as
    return _func_or_method(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/salt/grains/zfs.py", line 79, in zfs
    grains["zfs_support"] = __utils__["zfs.is_supported"]()
  File "/usr/lib/python3.6/site-packages/salt/loader_context.py", line 78, in __getitem__
    return self.value()[item]
  File "/usr/lib/python3.6/site-packages/salt/loader.py", line 1409, in __getitem__
    func = super().__getitem__(item)
  File "/usr/lib/python3.6/site-packages/salt/utils/lazy.py", line 108, in __getitem__
    raise KeyError(key)
**KeyError: 'zfs.is_supported'
2022-07-07 14:59:51,720 [salt.loader      :1859][ERROR   ][24496] Failed to import utils zfs, this is due most likely to a syntax error:**
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/salt/loader.py", line 1836, in _load_module
    mod = self.run(spec.loader.load_module)
  File "/usr/lib/python3.6/site-packages/salt/loader.py", line 2274, in run
    return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/contextvars/__init__.py", line 38, in run
    return callable(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/salt/loader.py", line 2289, in _run_as
    return _func_or_method(*args, **kwargs)
  File "<frozen importlib._bootstrap_external>", line 399, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 823, in load_module
  File "<frozen importlib._bootstrap_external>", line 682, in load_module
  File "<frozen importlib._bootstrap>", line 262, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 601, in _exec
  File "<frozen importlib._bootstrap>", line 148, in __enter__
  File "<frozen importlib._bootstrap>", line 174, in _get_module_lock
**RecursionError: maximum recursion depth exceeded while calling a Python object
2022-07-07 14:59:51,812 [salt.loader      :1859][ERROR   ][24496] Failed to import utils kinds, this is due most likely to a syntax error:**
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/salt/loader.py", line 1836, in _load_module
    mod = self.run(spec.loader.load_module)
  File "/usr/lib/python3.6/site-packages/salt/loader.py", line 2274, in run
    return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/contextvars/__init__.py", line 38, in run
    return callable(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/salt/loader.py", line 2289, in _run_as
    return _func_or_method(*args, **kwargs)
  File "<frozen importlib._bootstrap_external>", line 399, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 823, in load_module
  File "<frozen importlib._bootstrap_external>", line 682, in load_module
  File "<frozen importlib._bootstrap>", line 262, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 618, in _exec
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3.6/site-packages/salt/utils/kinds.py", line 17, in <module>
    ApplKind = namedtuple("ApplKind", list(APPL_KINDS.keys()))
  File "/usr/lib64/python3.6/collections/__init__.py", line 429, in namedtuple
    exec(class_definition, namespace)
RecursionError: maximum recursion depth exceeded during compilation
**2022-07-07 14:59:51,954 [salt.loader      :1859][ERROR   ][24496] Failed to import utils schema, this is due most likely to a syntax error**:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/salt/loader.py", line 1836, in _load_module
    mod = self.run(spec.loader.load_module)
  File "/usr/lib/python3.6/site-packages/salt/loader.py", line 2274, in run
    return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/contextvars/__init__.py", line 38, in run
    return callable(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/salt/loader.py", line 2289, in _run_as
    return _func_or_method(*args, **kwargs)
  File "<frozen importlib._bootstrap_external>", line 399, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 823, in load_module
  File "<frozen importlib._bootstrap_external>", line 682, in load_module
  File "<frozen importlib._bootstrap>", line 262, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 618, in _exec
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3.6/site-packages/salt/utils/schema.py", line 705, in <module>
    class SchemaItem(six.with_metaclass(BaseSchemaItemMeta, object)):
  File "/usr/lib/python3.6/site-packages/salt/ext/six.py", line 815, in __new__
    return meta(name, bases, d)
  File "/usr/lib/python3.6/site-packages/salt/utils/schema.py", line 506, in __new__
    for argname in salt.utils.args.get_function_argspec(base.__init__).args:
  File "/usr/lib/python3.6/site-packages/salt/utils/args.py", line 274, in get_function_argspec
    aspec = _getargspec(func.__call__)
  File "/usr/lib/python3.6/site-packages/salt/utils/args.py", line 31, in _getargspec
    _ArgSpec = namedtuple("ArgSpec", "args varargs keywords defaults")
  File "/usr/lib64/python3.6/collections/__init__.py", line 429, in namedtuple
    exec(class_definition, namespace)
RecursionError: maximum recursion depth exceeded during compilation

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

Steps to Reproduce the behavior running any state or calling list_module state function

Expected behavior It should run state and return True, it was working fine on previous version of saltstack

Versions Report

salt --versions-report ```yaml Salt Syndic minion Salt Version: Salt: 3003.4 Dependency Versions: cffi: 1.13.2 cherrypy: unknown dateutil: 2.4.2 docker-py: Not Installed gitdb: 2.0.6 gitpython: 3.0.5 Jinja2: 2.11.1 libgit2: 0.28.4 M2Crypto: 0.35.2 Mako: Not Installed msgpack: 0.6.2 msgpack-pure: Not Installed mysql-python: Not Installed pycparser: 2.19 pycrypto: 2.6.1 pycryptodome: Not Installed pygit2: 1.0.3 Python: 3.6.8 (default, Aug 13 2020, 07:46:32) python-gnupg: 0.4.4 PyYAML: 3.13 PyZMQ: 17.0.0 smmap: 2.0.5 timelib: Not Installed Tornado: 4.5.3 ZMQ: 4.1.4 System Versions: dist: rhel 7.9 Maipo locale: UTF-8 machine: x86_64 release: 3.10.0-1160.66.1.el7.x86_64 system: Linux version: Red Hat Enterprise Linux Server 7.9 Maipo ```

Additional context Running this command salt -l debug machine-hostname.com sys.list_functions

shivkumarsah commented 2 years ago

unable to finish git actions post script