mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
When using Salt multi-master, if we encouter a salt master that has not accepted the minion key yet we should not exit right away, rather continue on and try the next salt master available in the list.
This commit is contained in:
parent
13f67335f3
commit
8d1551c5fb
1 changed files with 12 additions and 3 deletions
|
@ -520,9 +520,18 @@ class AsyncAuth(object):
|
|||
error = SaltClientError('Detect mode is on')
|
||||
break
|
||||
if self.opts.get('caller'):
|
||||
print('Minion failed to authenticate with the master, '
|
||||
'has the minion key been accepted?')
|
||||
sys.exit(2)
|
||||
# We have a list of masters, so we should break
|
||||
# and try the next one in the list.
|
||||
if self.opts.get('local_masters', None):
|
||||
log.debug('=== opts %s ===', self.opts['master'])
|
||||
error = SaltClientError('Minion failed to authenticate'
|
||||
'with the master, has the has'
|
||||
'the minion key been accepted?')
|
||||
break
|
||||
else:
|
||||
print('Minion failed to authenticate with the master, '
|
||||
'has the minion key been accepted?')
|
||||
sys.exit(2)
|
||||
if acceptance_wait_time:
|
||||
log.info('Waiting {0} seconds before retry.'.format(acceptance_wait_time))
|
||||
yield tornado.gen.sleep(acceptance_wait_time)
|
||||
|
|
Loading…
Add table
Reference in a new issue