Skip to content

Incorrect error message for render issue #50691

Open

Description

@crux-capacitor

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

  1. added this to the Approved milestone on Dec 4, 2018
  2. added
    bug
    P2
    severity-medium
    on Dec 4, 2018
  3. garethgreenaway commented on Dec 4, 2018

    @garethgreenaway
    Contributor

    @crux-capacitor Thanks for the report. We should definitely show a render error here.

  4. removed
    P2
    on Jun 3, 2020
  5. self-assigned this
    on Sep 25, 2023
  6. modified the milestones: Approved, Argon v3008 on Sep 25, 2023
  7. dwoz commented on Oct 15, 2026

    @dwoz
    Contributor

    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.

  8. crux-capacitor commented on Oct 16, 2026

    @crux-capacitor
    Author

    @dwoz This is still an issue in 3008.3

    [root@ip-10-0-132-139 srv]# salt --version
    salt 3008.3 (Argon)
    [root@ip-10-0-132-139 srv]#
    [root@ip-10-0-132-139 srv]#
    [root@ip-10-0-132-139 srv]# salt-call state.apply test
    [INFO    ] Loading fresh modules for state activity
    [INFO    ] Fetching file from saltenv 'base', ** done ** 'test.sls'
    
    Passed invalid arguments: 'NoneType' object is not iterable.
    
    Usage:
    
    .. versionadded:: 2015.5.0
    
  9. dwoz commented on Oct 22, 2026

    @dwoz
    Contributor

    Reopening based on the follow-up comment above.

  10. reopened this on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugseverity-medium

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions