mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
add parallel support for orchestrations
originally the parallel global state requisite did not work correctly when invoked under an orch - this fixes that; as well as running any other saltmod state (function, runner, wheel).
This commit is contained in:
parent
d0f5b43753
commit
6e7007a4dc
3 changed files with 5 additions and 1 deletions
|
@ -1429,6 +1429,9 @@ def runner(name, arg=None, kwarg=None, full_return=False, saltenv='base', jid=No
|
|||
if 'saltenv' in aspec.args:
|
||||
kwarg['saltenv'] = saltenv
|
||||
|
||||
if name in ['state.orchestrate', 'state.orch', 'state.sls']:
|
||||
kwarg['orchestration_jid'] = jid
|
||||
|
||||
if jid:
|
||||
salt.utils.event.fire_args(
|
||||
__opts__,
|
||||
|
|
|
@ -229,7 +229,7 @@ class Runner(RunnerClient):
|
|||
async_pub = self._gen_async_pub()
|
||||
self.jid = async_pub['jid']
|
||||
|
||||
if low['fun'] in ('state.orchestrate', 'state.orch'):
|
||||
if low['fun'] in ['state.orchestrate', 'state.orch', 'state.sls']:
|
||||
low['kwarg']['orchestration_jid'] = async_pub['jid']
|
||||
|
||||
# Run the runner!
|
||||
|
|
|
@ -85,6 +85,7 @@ def orchestrate(mods,
|
|||
saltenv=saltenv,
|
||||
pillarenv=pillarenv,
|
||||
pillar_enc=pillar_enc,
|
||||
__pub_jid=orchestration_jid,
|
||||
orchestration_jid=orchestration_jid)
|
||||
ret = {'data': {minion.opts['id']: running}, 'outputter': 'highstate'}
|
||||
res = salt.utils.check_state_result(ret['data'])
|
||||
|
|
Loading…
Add table
Reference in a new issue