[BUG] salt-run state.event pretty=True hangs and ends with exception upon exit
Open
Nobody has claimed this yet.
bug
severity-low
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
Running the command salt-run state.event pretty=True hangs for an endless time period. Use Ctrl+C to exit and it returns an exception.
salt-run state.event pretty=True
^C
Exception occurred in runner state.event: Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/salt/client/mixins.py", line 397, in low
data["return"] = func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/runners/state.py", line 305, in event
node=node,
File "/usr/lib/python3.6/site-packages/salt/modules/state.py", line 2477, in event
ret = sevent.get_event(full=True, auto_reconnect=True)
File "/usr/lib/python3.6/site-packages/salt/utils/event.py", line 655, in get_event
ret = self._get_event(wait, tag, match_func, no_block)
File "/usr/lib/python3.6/site-packages/salt/utils/event.py", line 556, in _get_event
raw = self.subscriber.read_sync(timeout=wait)
File "/usr/lib/python3.6/site-packages/salt/transport/ipc.py", line 726, in read_sync
return self.io_loop.run_sync(lambda: self._read(timeout))
File "/usr/lib/python3.6/site-packages/salt/ext/tornado/ioloop.py", line 454, in run_sync
self.start()
File "/usr/lib/python3.6/site-packages/salt/ext/tornado/ioloop.py", line 865, in start
event_pairs = self._impl.poll(poll_timeout)
File "/usr/lib/python3.6/site-packages/salt/scripts.py", line 76, in _handle_signals
trace=trace,
File "/usr/lib/python3.6/site-packages/salt/scripts.py", line 40, in _handle_interrupt
raise exc
SystemExit:
Exiting gracefully on Ctrl-c
Versions Report
Salt Version:
Salt: 3002.2
Dependency Versions:
cffi: 1.14.0
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: 4.0.5
gitpython: 3.1.12
Jinja2: 2.11.1
libgit2: Not Installed
M2Crypto: 0.35.2
Mako: Not Installed
msgpack: 0.6.2
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: 2.20
pycrypto: Not Installed
pycryptodome: 3.9.8
pygit2: Not Installed
Python: 3.6.8 (default, Nov 16 2020, 16:55:22)
python-gnupg: Not Installed
PyYAML: 3.13
PyZMQ: 17.0.0
smmap: 3.0.4
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.1.4
System Versions:
dist: centos 7 Core
locale: UTF-8
machine: x86_64
release: 3.10.0-1160.11.1.el7.x86_64
system: Linux
version: CentOS Linux 7 Core
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
Reproduce the issue with salt-run state.event pretty=True, then trace the command through salt/runners/state.py, salt/modules/state.py, salt/utils/event.py, and salt/transport/ipc.py using the reported traceback. Done means the command no longer hangs indefinitely and exits without the reported exception when interrupted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100