Running multiple Salt States at a time on same Minion

2,171 views
Skip to first unread message

Abul Barakath

unread,
Aug 7, 2014, 10:15:40 AM8/7/14
to salt-...@googlegroups.com

Hi Experts,

 

When we run Salt States using “salt-call state.sls <state name>” for multiple states at a time we are getting errors like below and it is failing. So, running multiple states at a time not supported? We are with Salt master & minion version of 2014.1.7.  

 

We have actually scheduled running “state.sls” via scheduler and it is sometimes quite difficult to control the timing. Is there a way that we can work around this issue?

 

“The function "state.sls" is running as PID 5348 and was started at 2014, Aug 07 06:42:49.868240 with jid 20140807064249868240”

 

Thank you.

 

Regards,

Abul

Colton Myers

unread,
Aug 29, 2014, 7:07:09 PM8/29/14
to salt-...@googlegroups.com
The state system is not architected with parallel execution in mind.  Much like a package management system, the complexity would be too high.  So we have a state lock in place which makes it so that multiple state runs cannot be run at the same time.

I think what you're looking for is the `queue` argument [1].  Note that queued state runs don't timeout, so if a state run gets stuck, it will just wait forever.  Open issue to fix is here [2].


--
Colton Myers


--
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.

Ryan Lane

unread,
Aug 29, 2014, 10:26:54 PM8/29/14
to salt-...@googlegroups.com
In 2014.7 you can run state.sls with concurrent=True, but it's dangerous unless you know your states won't conflict with each other when you're running them concurrently.


--

Benjamen Keroack

unread,
Aug 30, 2014, 11:06:32 AM8/30/14
to salt-...@googlegroups.com
concurrent=True appears to be completely broken for Windows minions, according to my testing.

Ethan Erchinger

unread,
Aug 30, 2014, 11:40:46 AM8/30/14
to salt-...@googlegroups.com
If all you want is to run multiple states, but not necessarily in parallel, just provide a comma separated list of states to run. As documented here.

http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html

Weston McNamee

unread,
Jun 1, 2015, 12:05:00 PM6/1/15
to salt-...@googlegroups.com
@Benjamen,

Did you file a issue on the SaltStack github repo? If so, can you point me to it? I couldn't find one when I searched.
Reply all
Reply to author
Forward
0 new messages