mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Less intrusive bugfix
I am totally on board with making tune_in asynchronous but we'll have to address it in syndic and proxy minions too. As well as the corresponding managers. This change is a bit less intrusive but achieves the same end result.
This commit is contained in:
parent
1920e80a52
commit
788b42db6f
1 changed files with 5 additions and 5 deletions
|
@ -1152,7 +1152,7 @@ class MinionManager(MinionBase):
|
||||||
minion.setup_scheduler(before_connect=True)
|
minion.setup_scheduler(before_connect=True)
|
||||||
if minion.opts.get("master_type", "str") != "disable":
|
if minion.opts.get("master_type", "str") != "disable":
|
||||||
yield minion.connect_master(failed=failed)
|
yield minion.connect_master(failed=failed)
|
||||||
yield minion.tune_in(start=False)
|
minion.tune_in(start=False)
|
||||||
self.minions.append(minion)
|
self.minions.append(minion)
|
||||||
break
|
break
|
||||||
except SaltClientError as exc:
|
except SaltClientError as exc:
|
||||||
|
@ -2481,7 +2481,7 @@ class Minion(MinionBase):
|
||||||
log.trace("ret_val = %s", ret_val) # pylint: disable=no-member
|
log.trace("ret_val = %s", ret_val) # pylint: disable=no-member
|
||||||
return ret_val
|
return ret_val
|
||||||
|
|
||||||
async def _state_run(self):
|
def _state_run(self):
|
||||||
"""
|
"""
|
||||||
Execute a state run based on information set in the minion config file
|
Execute a state run based on information set in the minion config file
|
||||||
"""
|
"""
|
||||||
|
@ -2506,7 +2506,7 @@ class Minion(MinionBase):
|
||||||
else:
|
else:
|
||||||
data["fun"] = "state.highstate"
|
data["fun"] = "state.highstate"
|
||||||
data["arg"] = []
|
data["arg"] = []
|
||||||
await self._handle_decoded_payload(data)
|
self.io_loop.add_callback(self._handle_decoded_payload, data)
|
||||||
|
|
||||||
def _refresh_grains_watcher(self, refresh_interval_in_minutes):
|
def _refresh_grains_watcher(self, refresh_interval_in_minutes):
|
||||||
"""
|
"""
|
||||||
|
@ -3209,7 +3209,7 @@ class Minion(MinionBase):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Main Minion Tune In
|
# Main Minion Tune In
|
||||||
async def tune_in(self, start=True):
|
def tune_in(self, start=True):
|
||||||
"""
|
"""
|
||||||
Lock onto the publisher. This is the main event loop for the minion
|
Lock onto the publisher. This is the main event loop for the minion
|
||||||
:rtype : None
|
:rtype : None
|
||||||
|
@ -3236,7 +3236,7 @@ class Minion(MinionBase):
|
||||||
salt.utils.win_functions.enable_ctrl_logoff_handler()
|
salt.utils.win_functions.enable_ctrl_logoff_handler()
|
||||||
|
|
||||||
# On first startup execute a state run if configured to do so
|
# On first startup execute a state run if configured to do so
|
||||||
await self._state_run()
|
self._state_run()
|
||||||
|
|
||||||
self.setup_beacons()
|
self.setup_beacons()
|
||||||
self.setup_scheduler()
|
self.setup_scheduler()
|
||||||
|
|
Loading…
Add table
Reference in a new issue