mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix another round of coroutines being called incorrectly
This commit is contained in:
parent
05b01e268d
commit
8e28d02e2f
1 changed files with 7 additions and 5 deletions
|
@ -2527,6 +2527,7 @@ class Minion(MinionBase):
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@salt.ext.tornado.gen.coroutine
|
||||||
def _fire_master_minion_start(self):
|
def _fire_master_minion_start(self):
|
||||||
include_grains = False
|
include_grains = False
|
||||||
if self.opts["start_event_grains"]:
|
if self.opts["start_event_grains"]:
|
||||||
|
@ -2534,13 +2535,13 @@ class Minion(MinionBase):
|
||||||
# Send an event to the master that the minion is live
|
# Send an event to the master that the minion is live
|
||||||
if self.opts["enable_legacy_startup_events"]:
|
if self.opts["enable_legacy_startup_events"]:
|
||||||
# Old style event. Defaults to False in 3001 release.
|
# Old style event. Defaults to False in 3001 release.
|
||||||
self._fire_master_main(
|
yield self._fire_master_main(
|
||||||
"Minion {} started at {}".format(self.opts["id"], time.asctime()),
|
"Minion {} started at {}".format(self.opts["id"], time.asctime()),
|
||||||
"minion_start",
|
"minion_start",
|
||||||
include_startup_grains=include_grains,
|
include_startup_grains=include_grains,
|
||||||
)
|
)
|
||||||
# send name spaced event
|
# send name spaced event
|
||||||
self._fire_master_main(
|
yield self._fire_master_main(
|
||||||
"Minion {} started at {}".format(self.opts["id"], time.asctime()),
|
"Minion {} started at {}".format(self.opts["id"], time.asctime()),
|
||||||
tagify([self.opts["id"], "start"], "minion"),
|
tagify([self.opts["id"], "start"], "minion"),
|
||||||
include_startup_grains=include_grains,
|
include_startup_grains=include_grains,
|
||||||
|
@ -2975,7 +2976,7 @@ class Minion(MinionBase):
|
||||||
# make the schedule to use the new 'functions' loader
|
# make the schedule to use the new 'functions' loader
|
||||||
self.schedule.functions = self.functions
|
self.schedule.functions = self.functions
|
||||||
self.pub_channel.on_recv(self._handle_payload)
|
self.pub_channel.on_recv(self._handle_payload)
|
||||||
self._fire_master_minion_start()
|
yield self._fire_master_minion_start()
|
||||||
log.info("Minion is ready to receive requests!")
|
log.info("Minion is ready to receive requests!")
|
||||||
|
|
||||||
# update scheduled job to run with the new master addr
|
# update scheduled job to run with the new master addr
|
||||||
|
@ -3224,7 +3225,7 @@ class Minion(MinionBase):
|
||||||
self.setup_scheduler(before_connect=True)
|
self.setup_scheduler(before_connect=True)
|
||||||
self.sync_connect_master()
|
self.sync_connect_master()
|
||||||
if self.connected:
|
if self.connected:
|
||||||
self._fire_master_minion_start()
|
self.io_loop.add_callback(self._fire_master_minion_start)
|
||||||
log.info("Minion is ready to receive requests!")
|
log.info("Minion is ready to receive requests!")
|
||||||
|
|
||||||
# Make sure to gracefully handle SIGUSR1
|
# Make sure to gracefully handle SIGUSR1
|
||||||
|
@ -3267,7 +3268,8 @@ class Minion(MinionBase):
|
||||||
"minion is running under an init system."
|
"minion is running under an init system."
|
||||||
)
|
)
|
||||||
|
|
||||||
self._fire_master_main(
|
self.io_loop.add_callback(
|
||||||
|
self._fire_master_main,
|
||||||
"ping",
|
"ping",
|
||||||
"minion_ping",
|
"minion_ping",
|
||||||
timeout_handler=ping_timeout_handler,
|
timeout_handler=ping_timeout_handler,
|
||||||
|
|
Loading…
Add table
Reference in a new issue