mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #51442 from dwoz/multi_master
Handle multi_master failover when daemonized
This commit is contained in:
commit
68ac07f457
1 changed files with 10 additions and 0 deletions
|
@ -340,6 +340,16 @@ class Minion(parsers.MinionOptionParser, DaemonsMixin): # pylint: disable=no-in
|
|||
NOTE: Run any required code before calling `super()`.
|
||||
'''
|
||||
super(Minion, self).start()
|
||||
while True:
|
||||
try:
|
||||
self._real_start()
|
||||
except SaltClientError as exc:
|
||||
# Restart for multi_master failover when daemonized
|
||||
if self.options.daemon:
|
||||
continue
|
||||
break
|
||||
|
||||
def _real_start(self):
|
||||
try:
|
||||
if check_user(self.config['user']):
|
||||
self.action_log_info('Starting up')
|
||||
|
|
Loading…
Add table
Reference in a new issue