Reactor not executing cmd.run -- cmd_async() takes at least 3 arguments (2 given)

199 views
Skip to first unread message

Michael E

unread,
Jun 29, 2015, 9:19:02 AM6/29/15
to salt-...@googlegroups.com
I'm setting up the ec2-autoscale reactor on a test salt-master, but I'm modifying it to run a script rather than calling salt-cloud.

The script does not run successfully, and the debug info reports:
[WARNING ] Exception caught by reactor: cmd_async() takes at least 3 arguments (2 given)

I created a small state file with the same cmd.run call, and it does run successfully, so I'm wondering if I have to do something differently to get it to work as part of a reactor.

I'm running version 2015.5.0

Here is a gist with the state file that works, the reactor file that does not, and the debug output from salt-master:


This is the snippet that I'm having trouble with ... more context is included in the gist referenced above if necessary.

def run():
    instance_id = 'i-ed7ab63e'
    instance_code = instance_id[2:]
    ret = {
        'ec2_autoscale_minion_config': {
            'cmd.run': [
                {'name': '/root/minion-setup ' + instance_id},
                {'cwd': '/root'}
            ]
        }
    }
    return ret

Colton Myers

unread,
Jul 2, 2015, 1:27:25 PM7/2/15
to salt-...@googlegroups.com
Michael,

I'm not sure what's going on here. It's possible it's an interaction between the reactor and the python renderer or something. In any case, would you mind submitting an issue on Github with all the information you included here?

Thanks!

--
Colton Myers
Platform Engineer, SaltStack
@basepi on Twitter/Github/IRC

CONFIDENTIAL COMMUNICATION:

This email may contain confidential or legally privileged material, and is for the sole use of the intended recipient. Use or distribution by an unintended recipient is prohibited, and may be a violation of law. If you believe that you received this email in error, please do not read, forward, print or copy this email or any attachments.  Please delete the email and all attachments, and inform the sender that you have deleted the email and all attachments. Thank you.

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael E

unread,
Jul 6, 2015, 10:56:37 AM7/6/15
to salt-...@googlegroups.com

Colton Myers

unread,
Jul 14, 2015, 6:47:32 PM7/14/15
to salt-...@googlegroups.com
Thanks!

--
Colton Myers
Platform Engineer, SaltStack
@basepi on Twitter/Github/IRC
Reply all
Reply to author
Forward
0 new messages