Repository navigation
Description
Description of Issue/Question
When using '- names' of cmd.run in a state, if there is a trailing colon on the end of a command with nothing defined underneath, Salt errors out that invalid arguments were passed to state.apply rather than throwing a render error, or some other more descriptive error.
I guess it's not technically invalid SLS, but this makes troubleshooting the error really confusing because the state does render when using state.show_sls, but state.apply fails as if I am not running it correctly.
Setup
test.sls
"Test Breakage":
cmd.run:
- names:
- 'echo "something"':
Steps to Reproduce Issue
[root@saltmaster salt]# salt-call state.apply test
Passed invalid arguments: 'NoneType' object is not iterable.
Usage:
.. versionadded:: 2015.5.0
This function will call :mod:`state.highstate
<salt.modules.state.highstate>` or :mod:`state.sls
<salt.modules.state.sls>` based on the arguments passed to this function.
It exists as a more intuitive way of applying states.
... the rest of the help output
Versions Report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
My minions and master are all using 2018.3.2.
Salt Version:
Salt: 2018.3.2
Dependency Versions:
cffi: 1.6.0
cherrypy: Not Installed
dateutil: 2.7.3
docker-py: 3.5.0
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: 0.26.3
libnacl: Not Installed
M2Crypto: 0.28.2
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: Not Installed
pycparser: 2.14
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: 0.26.4
Python: 2.7.5 (default, Sep 12 2018, 05:31:16)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.3.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: redhat 7.6 Maipo
locale: UTF-8
machine: x86_64
release: 3.10.0-957.el7.x86_64
system: Linux
version: Red Hat Enterprise Linux Server 7.6 Maipo
Activity
garethgreenaway commentedon Dec 4, 2018
@crux-capacitor Thanks for the report. We should definitely show a render error here.
dwoz commentedon Oct 15, 2026
Thanks for the original report. This issue has been open for more than three years without recent activity and carries a severity label below
severity-high. As part of a backlog cleanup, we're closing older low- and medium-severity issues so triage can focus on reports against currently supported releases.Closing isn't a judgement that the problem wasn't real — only that the codebase has moved through several releases since this was filed, and much of the surrounding code has changed.
If you — or anyone else — can still reproduce this on the 3008.x LTS release, please leave a comment with a reproduction and a maintainer will reopen. The original reporter can also reopen directly.
crux-capacitor commentedon Oct 16, 2026
@dwoz This is still an issue in 3008.3
dwoz commentedon Oct 22, 2026
Reopening based on the follow-up comment above.