Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

saltstack: run parallel / wait for other jobs

Tags:

salt-project

I have multiple salt states and commands which are executed while other jobs could currently running.

Then I get an error for new jobs, something like:

The function "state.apply" is running as PID 3869 and was started at 2017, Mar 23 10:19:32.691177 with jid 20170323101932691177

Is there a way to wait for other jobs to complete first or to run the job in parallel?

like image 517
imehl Avatar asked Oct 16 '25 18:10

imehl


1 Answers

You can queue the execution of salt states: salt minion_A state.apply some.state queue=True

This will queue the state if any other states are currently running, keep in mind that this option starts a new thread for each queued state run, so use this option sparingly (https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.state.html).

like image 100
Alex Zel Avatar answered Oct 19 '25 13:10

Alex Zel