[BUG] Using the --static option causes Exception in cmd_iter_no_block
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
Using the --static option causes Exception in cmd_iter_no_block
Setup
Salt master running 3003 -> salt syndic running 3003 -> salt minion running 3003
Steps to Reproduce the behavior
root@salt-master:~ # salt server123 test.ping
server123:
True
root@salt-master:~ # salt --static server123 test.ping
Exception ignored in: <generator object LocalClient.cmd_iter_no_block at 0x7f6e4cd9e9e8>
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/salt/client/init.py", line 939, in cmd_iter_no_block
self.event.close_pub()
AttributeError: 'NoneType' object has no attribute 'close_pub'
server123:
True
Expected behavior
--static option does not raise exception
Screenshots
If applicable, add screenshots to help explain your problem.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)root@salt-master:~ # salt --versions-report
Salt Version:
Salt: 3003
Dependency Versions:
cffi: Not Installed
cherrypy: unknown
dateutil: 2.6.1
docker-py: Not Installed
gitdb: 2.0.3
gitpython: 2.1.8
Jinja2: 2.10
libgit2: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 0.5.6
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: Not Installed
pycryptodome: 3.4.7
pygit2: Not Installed
Python: 3.6.9 (default, Apr 18 2020, 01:56:04)
python-gnupg: 0.4.1
PyYAML: 3.12
PyZMQ: 17.1.2
smmap: 2.0.3
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.2.5
System Versions:
dist: ubuntu 18.04 Bionic Beaver
locale: UTF-8
machine: x86_64
release: 4.15.0-99-generic
system: Linux
version: Ubuntu 18.04 Bionic Beaver
# salt minion package version
server123:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-================================================================
ii salt-minion 3003+ds-1 all client package for salt, the distributed remote execution system
Additional context
Add any other context about the problem here.
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 in salt/client/init.py at cmd_iter_no_block, then reproduce the reported salt --static server123 test.ping command in the documented master, syndic, and minion setup. Trace the cleanup around self.event.close_pub and verify that the command still returns the minion result without raising an exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100