[BUG] saltutil.sync_clouds NamespacedDictWrapper error when run on master
Open
@dwoz is already working on this.
Since Jul 2, 2021.
bug
Pillar
severity-high
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
saltutil.sync_clouds throws an error when run from the master. However when run on the minion with salt-call, there is no error
Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info).
Steps to Reproduce the behavior
# salt ish.delish saltutil.sync_clouds
ish.delish:
The minion function caused an exception: Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/salt/modules/saltutil.py", line 79, in _get_top_file_envs
return __context__["saltutil._top_file_envs"]
File "/usr/local/lib/python3.7/site-packages/salt/utils/context.py", line 223, in __getitem__
return self._dict()[key]
KeyError: 'saltutil._top_file_envs'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/salt/minion.py", line 1890, in _thread_return
or getattr(minion_instance, "module_executors", [])
File "/usr/local/lib/python3.7/site-packages/salt/minion.py", line 1846, in _execute_job_function
executors = [executors]
File "/usr/local/lib/python3.7/site-packages/salt/executors/direct_call.py", line 12, in execute
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/salt/modules/saltutil.py", line 762, in sync_clouds
ret = _sync("clouds", saltenv, extmod_whitelist, extmod_blacklist)
File "/usr/local/lib/python3.7/site-packages/salt/modules/saltutil.py", line 99, in _sync
saltenv = _get_top_file_envs()
File "/usr/local/lib/python3.7/site-packages/salt/modules/saltutil.py", line 82, in _get_top_file_envs
st_ = salt.state.HighState(__opts__, initial_pillar=__pillar__.value())
AttributeError: 'NamespacedDictWrapper' object has no attribute 'value'
Versions Report
# salt --versions-report
Salt Version:
Salt: 3003.1
Dependency Versions:
cffi: 1.14.5
cherrypy: Not Installed
dateutil: 2.8.1
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 2.11.2
libgit2: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.2
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: 2.20
pycrypto: Not Installed
pycryptodome: 3.10.1
pygit2: Not Installed
Python: 3.7.10 (default, Jun 20 2021, 08:56:04)
python-gnupg: Not Installed
PyYAML: 5.4.1
PyZMQ: 22.1.0
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.4
System Versions:
dist: freebsd 13.0
locale: utf-8
machine: amd64
release: 13.0-RELEASE-p1
system: FreeBSD
version: FreeBSD 13.0
Note that salt and salt-call were run on the same machine. The first fails and the second succeeds.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.