Skip to content

[BUG] Salt calls with error returns code as zero / successful  #65350

@ecstuchi

Description

@ecstuchi

Description
A clear and concise description of what the bug is.

Setup

Other Salt calls behave the same way.

(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
How to reproduce it:

  • systemctl stop salt-master.service
  • salt '' test.ping
    [root@abc123~]# salt '
    ' test.ping
    [ERROR ] Encountered StreamClosedException
    [ERROR ]
    Salt request timed out. The master is not responding. You may need to run your command with --async in order to bypass the congested event bus. With --async, the CLI tool will print the job id (jid) and exit immediately without listening for responses. You can then use salt-run jobs.lookup_jid to look up the results of the job in the job cache later.
    [root@abc123~]# echo $?
    0

Expected behavior
If there's any error, exit without being zero.

Screenshots
N/A
Versions Report

salt -V

Salt Version:
Salt: 3006.2

Python Version:
Python: 3.10.12 (main, Aug 3 2023, 21:47:10) [GCC 11.2.0]

Dependency Versions:
cffi: 1.14.6
cherrypy: unknown
dateutil: 2.8.1
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 3.1.2
libgit2: Not Installed
looseversion: 1.0.2
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.2
msgpack-pure: Not Installed
mysql-python: Not Installed
packaging: 22.0
pycparser: 2.21
pycrypto: Not Installed
pycryptodome: 3.9.8
pygit2: Not Installed
python-gnupg: 0.4.8
PyYAML: 6.0.1
PyZMQ: 23.2.0
relenv: 0.13.3
smmap: Not Installed
timelib: 0.2.4
Tornado: 4.5.3
ZMQ: 4.3.4

System Versions:
dist: rhel 8.8 Ootpa
locale: utf-8
machine: x86_64
release: 4.18.0-477.15.1.el8_8.x86_64
system: Linux
version: Red Hat Enterprise Linux 8.8 Ootpa

N/A```
</details>

**Additional context**
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugbroken, incorrect, or confusing behaviorpending-discussionThe issue or pull request needs more discussion before it can be closed or merged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions