Repository navigation
Closed
Closed
Copy link
Labels
Corerelates to code central or existential to Saltbugbroken, incorrect, or confusing behaviorseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone
Description
Description
Issue #56273 is still present in 3003.2, but manifests itself only during the high CPU load\CPU resource starvation.
[ERROR ] An un-handled exception was caught by salt's global exception handler:
KeyError: 'retcode'
Traceback (most recent call last):
File "/opt/behavox/salt/venv/bin/salt", line 11, in <module>
load_entry_point('salt==3003.2', 'console_scripts', 'salt')()
File "/opt/behavox/salt/venv/lib64/python3.6/site-packages/salt/scripts.py", line 539, in salt_main
client.run()
File "/opt/behavox/salt/venv/lib64/python3.6/site-packages/salt/cli/salt.py", line 108, in run
self._run_batch()
File "/opt/behavox/salt/venv/lib64/python3.6/site-packages/salt/cli/salt.py", line 299, in _run_batch
for res in batch.run():
File "/opt/behavox/salt/venv/lib64/python3.6/site-packages/salt/cli/batch.py", line 291, in run
if self.opts.get("failhard") and data["retcode"] > 0:
KeyError: 'retcode'
Traceback (most recent call last):
File "/opt/behavox/salt/venv/bin/salt", line 11, in <module>
load_entry_point('salt==3003.2', 'console_scripts', 'salt')()
File "/opt/behavox/salt/venv/lib64/python3.6/site-packages/salt/scripts.py", line 539, in salt_main
client.run()
File "/opt/behavox/salt/venv/lib64/python3.6/site-packages/salt/cli/salt.py", line 108, in run
self._run_batch()
File "/opt/behavox/salt/venv/lib64/python3.6/site-packages/salt/cli/salt.py", line 299, in _run_batch
for res in batch.run():
File "/opt/behavox/salt/venv/lib64/python3.6/site-packages/salt/cli/batch.py", line 291, in run
if self.opts.get("failhard") and data["retcode"] > 0:
KeyError: 'retcode'
Setup
- VM running on a cloud service, please be explicit and add details
AWS EC2 m5.2xlarge instance.
Steps to Reproduce the behavior
We were able to reproduce it on 173 nodes cluster using just a
salt \* saltutil.refresh_pillar wait=true
with batch size of 50 (triggered via batch_safe_size param)
Expected behavior
The execution would finish or time out.
Additional context
We don't have enough CPU resources on that node to run Salt properly. We set worker_threads: 6 but sometimes we don't have 6 CPUs ready to serve salt requests - they could be consumed by other things on the cluster.
And seems like it's a deciding factor for triggering that issue. (not 100% sure)
- execution start
- execution failed
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Salt Version:
Salt: 3003.2
Dependency Versions:
cffi: 1.14.5
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 2.11.3
libgit2: Not Installed
M2Crypto: 0.37.1
Mako: Not Installed
msgpack: 1.0.2
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: 2.20
pycrypto: 2.6.1
pycryptodome: 3.10.1
pygit2: Not Installed
Python: 3.6.8 (default, Aug 7 2019, 17:28:10)
python-gnupg: 0.4.5
PyYAML: 5.4.1
PyZMQ: 19.0.2
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.2
System Versions:
dist: centos 7 Core
locale: UTF-8
machine: x86_64
release: 3.10.0-1062.4.3.el7.x86_64
system: Linux
version: CentOS Linux 7 Core```
</details>
Metadata
Metadata
Assignees
Labels
Corerelates to code central or existential to Saltbugbroken, incorrect, or confusing behaviorseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around

Activity
[-][BUG][/-][+][BUG] Salt execution sometimes failes with exception with KeyError: 'retcode' error[/+]Oloremo commentedon Oct 20, 2021
I'm aware it would be very hard to reproduce but I can reproduce it very easily on that env, so I'm happy to apply any patches or do any other debug to help with that issue.
frogunder commentedon Oct 21, 2021
@dwoz maybe you can take a look at this since it might be related to #56273
or @saltstack/team-core ?
Oloremo commentedon Oct 21, 2021
It's related. The same issue, the original fix seems like only reduced the race window.
dmurphy18 commentedon Jul 11, 2023
Closing this since Salt 3003.2 which is EOL. If reoccurs, should reopen against latest which is 3006.1 using onedir packaging