From c3a1e9d87a93403184014cd69fc2001832d702d0 Mon Sep 17 00:00:00 2001 From: Matt Phillips Date: Mon, 24 Sep 2018 13:31:27 -0400 Subject: [PATCH] state.orch: generate jid if missing via salt-run cli a jid is generated in RunnerClient via gen_async_pub and passed on via orchestration_jid if the func is orchestration, but in other callsites this jid generation doesn't happen (ie, the netapi client, since it directly invokes AsyncMixins.cmd_sync). There seems to be no obvious way to correct this at the netapi level so we just default to a new jid if orch_jid is missing. there may be other calling contexts where this could have been occurring. --- salt/runners/state.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/salt/runners/state.py b/salt/runners/state.py index d866dc8ef155..f9a5cc0dbd8f 100644 --- a/salt/runners/state.py +++ b/salt/runners/state.py @@ -10,6 +10,7 @@ import salt.loader import salt.utils.event import salt.utils.functools +import salt.utils.jid from salt.exceptions import SaltInvocationError LOGGER = logging.getLogger(__name__) @@ -110,6 +111,8 @@ def orchestrate(mods, pillarenv = __opts__['pillarenv'] if saltenv is None and 'saltenv' in __opts__: saltenv = __opts__['saltenv'] + if orchestration_jid is None: + orchestration_jid = salt.utils.jid.gen_jid(__opts__) running = minion.functions['state.sls']( mods,