mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
pass utils to the scheduler for reloading in modules
This commit is contained in:
parent
0e90c8ca6f
commit
2883548e6b
2 changed files with 5 additions and 3 deletions
|
@ -2275,6 +2275,7 @@ class Minion(MinionBase):
|
|||
self.opts,
|
||||
self.functions,
|
||||
self.returners,
|
||||
utils=self.utils,
|
||||
cleanup=[master_event(type='alive')])
|
||||
|
||||
try:
|
||||
|
|
|
@ -402,10 +402,11 @@ class Schedule(object):
|
|||
pass
|
||||
|
||||
# an init for the singleton instance to call
|
||||
def __singleton_init__(self, opts, functions, returners=None, intervals=None, cleanup=None, proxy=None):
|
||||
def __singleton_init__(self, opts, functions, returners=None, intervals=None, cleanup=None, proxy=None, utils=None):
|
||||
self.opts = opts
|
||||
self.proxy = proxy
|
||||
self.functions = functions
|
||||
self.utils = utils
|
||||
if isinstance(intervals, dict):
|
||||
self.intervals = intervals
|
||||
else:
|
||||
|
@ -752,9 +753,9 @@ class Schedule(object):
|
|||
# context data that could keep paretns connections. ZeroMQ will
|
||||
# hang on polling parents connections from the child process.
|
||||
if self.opts['__role'] == 'master':
|
||||
self.functions = salt.loader.runner(self.opts)
|
||||
self.functions = salt.loader.runner(self.opts, utils=self.utils)
|
||||
else:
|
||||
self.functions = salt.loader.minion_mods(self.opts, proxy=self.proxy)
|
||||
self.functions = salt.loader.minion_mods(self.opts, proxy=self.proxy, utils=self.utils)
|
||||
self.returners = salt.loader.returners(self.opts, self.functions, proxy=self.proxy)
|
||||
ret = {'id': self.opts.get('id', 'master'),
|
||||
'fun': func,
|
||||
|
|
Loading…
Add table
Reference in a new issue