Skip to content

Commit 41a2484

Browse files
authored
[3000.8] Fix Runners in SSE (#173)
* Runners fix * Rework runner fix * Add changelog for sse fix
1 parent 578b493 commit 41a2484

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Fixed
1313
-----
1414

1515
- Fix runners that broke when patching for CVE-2021-25281
16+
- Fix issue with runners in SSE
1617

1718
Salt 3000.7 (2021-01-28)
1819
========================

salt/client/mixins.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ class AsyncClientMixin(object):
450450
client = None
451451
tag_prefix = None
452452

453-
def _proc_function(self, fun, low, user, tag, jid, daemonize=True):
453+
def _proc_function_remote(self, fun, low, user, tag, jid, daemonize=True):
454454
'''
455455
Run this method in a multiprocess target to execute the function on the
456456
master and fire the return data on the event bus
@@ -474,7 +474,7 @@ def _proc_function(self, fun, low, user, tag, jid, daemonize=True):
474474
except salt.exceptions.EauthAuthenticationError as exc:
475475
log.error(exc)
476476

477-
def _proc_function_local(self, fun, low, user, tag, jid, daemonize=True):
477+
def _proc_function(self, fun, low, user, tag, jid, daemonize=True):
478478
'''
479479
Run this method in a multiprocess target to execute the function
480480
locally and fire the return data on the event bus
@@ -521,15 +521,15 @@ def _gen_async_pub(self, jid=None):
521521
tag = salt.utils.event.tagify(jid, prefix=self.tag_prefix)
522522
return {'tag': tag, 'jid': jid}
523523

524-
def asynchronous(self, fun, low, user="UNKNOWN", pub=None, local=False):
524+
def asynchronous(self, fun, low, user="UNKNOWN", pub=None, local=True):
525525
'''
526526
Execute the function in a multiprocess and return the event tag to use
527527
to watch for the return
528528
'''
529529
if local:
530-
proc_func = self._proc_function_local
531-
else:
532530
proc_func = self._proc_function
531+
else:
532+
proc_func = self._proc_function_remote
533533
async_pub = pub if pub is not None else self._gen_async_pub()
534534
proc = salt.utils.process.SignalHandlingProcess(
535535
target=proc_func,

salt/wheel/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ def cmd_async(self, low):
123123
})
124124
{'jid': '20131219224744416681', 'tag': 'salt/wheel/20131219224744416681'}
125125
'''
126-
fun = low.get('fun')
127-
return self.asynchronous(fun, low)
126+
fun = low.get("fun")
127+
return self.asynchronous(fun, low, local=False)
128128

129129
def cmd(self, fun, arg=None, pub_data=None, kwarg=None, print_event=True, full_return=False): # pylint: disable=useless-super-delegation
130130
'''

0 commit comments

Comments
 (0)