Skip to content

error using module.run -> saltutil.runner -> state.orchestrate: "The following arguments are missing: _fun" #31851

Closed

Description

@rhansen

Description of Issue

If I create a state file that uses module.run to execute saltutil.runner to execute state.orchestrate, I get the following error:

master:
----------
          ID: orchestrate
    Function: module.run
        Name: saltutil.runner
      Result: False
     Comment: The following arguments are missing: _fun
     Started: 18:17:12.237399
    Duration: 0.817 ms
     Changes:   

Setup

  • /etc/salt/master:

    file_roots:
      base:
        - /salt/base/states
    pillar_roots:
      base:
        - /salt/base/pillar
    module_dirs:
      - salt/modules
  • /salt/base/states/foo.sls:

    orchestrate:
      module.run:
        - name: saltutil.runner
        - m_name: state.orchestrate
        - kwargs:
            mods: orchestrate
  • /salt/base/states/orchestrate.sls:

    uptime:
      salt.function:
        - tgt: '*'
        - name: cmd.run
        - arg:
          - uptime

Steps to Reproduce Issue

Configure as described above and run the following on the master:

sudo salt master state.sls foo

(this assumes the master is also a minion with minion ID master)

Versions Report

Salt Version:
           Salt: 2015.8.7

Dependency Versions:
         Jinja2: 2.7.2
       M2Crypto: Not Installed
           Mako: 0.9.1
         PyYAML: 3.10
          PyZMQ: 14.4.0
         Python: 2.7.6 (default, Jun 22 2015, 17:58:13)
           RAET: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.0.4
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 1.5
          gitdb: 0.5.4
      gitpython: 0.3.2 RC1
          ioflo: Not Installed
        libgit2: Not Installed
        libnacl: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.3.0
   mysql-python: 1.2.3
      pycparser: Not Installed
       pycrypto: 2.6.1
         pygit2: Not Installed
   python-gnupg: Not Installed
          smmap: 0.8.2
        timelib: Not Installed

System Versions:
           dist: Ubuntu 14.04 trusty
        machine: x86_64
        release: 4.2.0-30-generic
         system: Ubuntu 14.04 trusty

Activity

  1. rhansen commented on Mar 12, 2016

    @rhansen
    ContributorAuthor

    I just noticed the following in the documentation for saltutil.runner:

    salt.modules.saltutil.runner(_fun, **kwargs)
        ...
        name
            The name of the function to run
    

    Notice how the parameter name in the function signature is _fun but the documentation uses name.

    If I change my foo.sls to this then it works:

    orchestrate:
      module.run:
        - name: saltutil.runner
        - _fun: state.orchestrate
        - kwargs:
            mods: orchestrate
  2. added
    bug
    severity-medium
    Core
    P3
    on Mar 14, 2016
  3. added this to the Approved milestone on Mar 14, 2016
  4. jfindlay commented on Mar 14, 2016

    @jfindlay
    Contributor

    @rhansen, thanks for reporting.

  5. added a commit that references this issue on Apr 8, 2016
    7b0944a
  6. rallytime commented on Apr 8, 2016

    @rallytime
    Contributor

    @rhansen I have fixed the doc discrepancy in #32445. Thanks for letting us know and for the useful issue description!

  7. self-assigned this
    on Apr 8, 2016
  8. modified the milestones: B -1, Approved on Apr 8, 2016
  9. added
    fixed-pls-verify
    on Apr 8, 2016
  10. added a commit that references this issue on Apr 8, 2016
    cef33d5
  11. added a commit that references this issue on Apr 11, 2016
    216d9fd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

CoreP3Runnersbugfixed-pls-verifyseverity-medium

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions