[BUG] KeyError: 'transactional_update.apply'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
I am running openSUSE microOS 20230725
with
salt-minion-3006.0-1.4.aarch64
salt-transactional-update-3006.0-1.4.aarch64
When I do (as I learned from the documentation)
salt-call --file-root /root/my-salt --module-executors='[transactional_update]' --local state.apply
I see the following issue
/usr/lib/python3.11/site-packages/salt/utils/http.py:8: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
import cgi
/usr/lib/python3.11/site-packages/salt/utils/jinja.py:9: DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13
import pipes
/usr/lib/python3.11/site-packages/salt/grains/core.py:2711: DeprecationWarning: Use setlocale(), getencoding() and getlocale() instead
) = locale.getdefaultlocale()
/usr/lib/python3.11/site-packages/salt/utils/pycrypto.py:26: DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13
import crypt
/usr/lib/python3.11/site-packages/salt/modules/linux_shadow.py:21: DeprecationWarning: 'spwd' is deprecated and slated for removal in Python 3.13
import spwd
[ERROR ] An un-handled exception was caught by Salt's global exception handler:
KeyError: 'transactional_update.apply'
Traceback (most recent call last):
File "/usr/bin/salt-call", line 10, in <module>
salt_call()
File "/usr/lib/python3.11/site-packages/salt/scripts.py", line 444, in salt_call
client.run()
File "/usr/lib/python3.11/site-packages/salt/cli/call.py", line 50, in run
caller.run()
File "/usr/lib/python3.11/site-packages/salt/cli/caller.py", line 95, in run
ret = self.call()
^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/salt/cli/caller.py", line 202, in call
ret["return"] = self.minion.executors[fname](
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/salt/loader/lazy.py", line 149, in __call__
return self.loader.run(run_func, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/salt/loader/lazy.py", line 1234, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/salt/loader/lazy.py", line 1249, in _run_as
return _func_or_method(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/salt/executors/transactional_update.py", line 123, in execute
opts, data, __salt__[DELEGATION_MAP[fun]], args, kwargs
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/salt/loader/context.py", line 78, in __getitem__
return self.value()[item]
~~~~~~~~~~~~^^^^^^
File "/usr/lib/python3.11/site-packages/salt/loader/lazy.py", line 336, in __getitem__
super().__getitem__(item) # try to get the item from the dictionary
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/salt/utils/lazy.py", line 105, in __getitem__
raise KeyError(key)
KeyError: 'transactional_update.apply'
Traceback (most recent call last):
File "/usr/bin/salt-call", line 10, in <module>
salt_call()
File "/usr/lib/python3.11/site-packages/salt/scripts.py", line 444, in salt_call
client.run()
File "/usr/lib/python3.11/site-packages/salt/cli/call.py", line 50, in run
caller.run()
File "/usr/lib/python3.11/site-packages/salt/cli/caller.py", line 95, in run
ret = self.call()
^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/salt/cli/caller.py", line 202, in call
ret["return"] = self.minion.executors[fname](
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/salt/loader/lazy.py", line 149, in __call__
return self.loader.run(run_func, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/salt/loader/lazy.py", line 1234, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/salt/loader/lazy.py", line 1249, in _run_as
return _func_or_method(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/salt/executors/transactional_update.py", line 123, in execute
opts, data, __salt__[DELEGATION_MAP[fun]], args, kwargs
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/salt/loader/context.py", line 78, in __getitem__
return self.value()[item]
~~~~~~~~~~~~^^^^^^
File "/usr/lib/python3.11/site-packages/salt/loader/lazy.py", line 336, in __getitem__
super().__getitem__(item) # try to get the item from the dictionary
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/salt/utils/lazy.py", line 105, in __getitem__
raise KeyError(key)
KeyError: 'transactional_update.apply'
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
Install openSUSE MicroOS and run the following command:
salt-call --file-root /root/my-salt --module-executors='[transactional_update]' --local state.apply
Expected behavior
salt-call will apply the state
Versions Report
Salt Version:
Salt: 3006.0
Python Version:
Python: 3.11.4 (main, Jun 28 2023, 19:51:46) [GCC]
Dependency Versions:
cffi: 1.15.1
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 3.1.2
libgit2: Not Installed
looseversion: 1.1.2
M2Crypto: 0.39.0
Mako: Not Installed
msgpack: 1.0.5
msgpack-pure: Not Installed
mysql-python: Not Installed
packaging: 23.1
pycparser: 2.21
pycrypto: Not Installed
pycryptodome: Not Installed
pygit2: Not Installed
python-gnupg: Not Installed
PyYAML: 6.0
PyZMQ: 25.0.2
relenv: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.4
System Versions:
dist: opensuse-microos 20230725
locale: utf-8
machine: aarch64
release: 6.4.4-1-default
system: Linux
version: openSUSE MicroOS 20230725
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.
Research direction
Start with salt/executors/transactional_update.py around execute, especially the DELEGATION_MAP lookup shown in the traceback. Reproduce the documented salt-call command on the reported MicroOS setup and trace how state.apply is resolved. Done means the command applies the state without raising KeyError: 'transactional_update.apply'.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100